diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2019-10-02 16:35:49 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2019-10-14 16:48:59 -0400 |
commit | 218f38c7ecdea970a5e82a48e7782077be4fc248 (patch) | |
tree | 98c0dc91a6253b678a3cd3dc781b5b4c10044e65 /core/math/vector3.h | |
parent | aeb70756287ad209f0b9d799bcd157dcaed41c17 (diff) | |
download | redot-engine-218f38c7ecdea970a5e82a48e7782077be4fc248.tar.gz |
Expose is_equal_approx and restore == to be exact again
This commit changes behavior for GDScript and C#.
Also did some organizing of the order to logically group related methods, mostly for Rect2 and AABB.
Diffstat (limited to 'core/math/vector3.h')
-rw-r--r-- | core/math/vector3.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h index ac42238ed4..43fa09ffac 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -332,11 +332,12 @@ Vector3 Vector3::operator-() const { bool Vector3::operator==(const Vector3 &p_v) const { - return (Math::is_equal_approx(x, p_v.x) && Math::is_equal_approx(y, p_v.y) && Math::is_equal_approx(z, p_v.z)); + return x == p_v.x && y == p_v.y && z == p_v.z; } bool Vector3::operator!=(const Vector3 &p_v) const { - return (!Math::is_equal_approx(x, p_v.x) || !Math::is_equal_approx(y, p_v.y) || !Math::is_equal_approx(z, p_v.z)); + + return x != p_v.x || y != p_v.y || z != p_v.z; } bool Vector3::operator<(const Vector3 &p_v) const { |