summaryrefslogtreecommitdiff
path: root/core/math/vector3.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/vector3.h')
-rw-r--r--core/math/vector3.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 3e35a5bba2..0bc1a467f2 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -323,10 +323,11 @@ bool Vector3::operator!=(const Vector3 &p_v) const {
bool Vector3::operator<(const Vector3 &p_v) const {
if (Math::is_equal_approx(x, p_v.x)) {
- if (Math::is_equal_approx(y, p_v.y))
+ if (Math::is_equal_approx(y, p_v.y)) {
return z < p_v.z;
- else
+ } else {
return y < p_v.y;
+ }
} else {
return x < p_v.x;
}
@@ -334,10 +335,11 @@ bool Vector3::operator<(const Vector3 &p_v) const {
bool Vector3::operator>(const Vector3 &p_v) const {
if (Math::is_equal_approx(x, p_v.x)) {
- if (Math::is_equal_approx(y, p_v.y))
+ if (Math::is_equal_approx(y, p_v.y)) {
return z > p_v.z;
- else
+ } else {
return y > p_v.y;
+ }
} else {
return x > p_v.x;
}
@@ -345,10 +347,11 @@ bool Vector3::operator>(const Vector3 &p_v) const {
bool Vector3::operator<=(const Vector3 &p_v) const {
if (Math::is_equal_approx(x, p_v.x)) {
- if (Math::is_equal_approx(y, p_v.y))
+ if (Math::is_equal_approx(y, p_v.y)) {
return z <= p_v.z;
- else
+ } else {
return y < p_v.y;
+ }
} else {
return x < p_v.x;
}
@@ -356,10 +359,11 @@ bool Vector3::operator<=(const Vector3 &p_v) const {
bool Vector3::operator>=(const Vector3 &p_v) const {
if (Math::is_equal_approx(x, p_v.x)) {
- if (Math::is_equal_approx(y, p_v.y))
+ if (Math::is_equal_approx(y, p_v.y)) {
return z >= p_v.z;
- else
+ } else {
return y > p_v.y;
+ }
} else {
return x > p_v.x;
}