summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/math/vector3.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 597d3c22a8..c68b075613 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -369,8 +369,8 @@ bool Vector3::operator<(const Vector3 &p_v) const {
bool Vector3::operator>(const Vector3 &p_v) const {
- if (x == p_v.x) {
- if (y == p_v.y)
+ if (Math::is_equal_approx(x, p_v.x)) {
+ if (Math::is_equal_approx(y, p_v.y))
return z > p_v.z;
else
return y > p_v.y;
@@ -393,8 +393,8 @@ bool Vector3::operator<=(const Vector3 &p_v) const {
bool Vector3::operator>=(const Vector3 &p_v) const {
- if (x == p_v.x) {
- if (y == p_v.y)
+ if (Math::is_equal_approx(x, p_v.x)) {
+ if (Math::is_equal_approx(y, p_v.y))
return z >= p_v.z;
else
return y > p_v.y;