Merge pull request #45321 from aaronfranke/vector-operators-equality

Remove useless "else" statements from vector3.h
This commit is contained in:
Rémi Verschelde 2021-01-19 23:47:42 +01:00 committed by GitHub
commit 5a9bd8e51c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 16 deletions

View File

@ -324,49 +324,41 @@ bool Vector3::operator<(const Vector3 &p_v) const {
if (x == p_v.x) {
if (y == p_v.y) {
return z < p_v.z;
} else {
}
return y < p_v.y;
}
} else {
return x < p_v.x;
}
}
bool Vector3::operator>(const Vector3 &p_v) const {
if (x == p_v.x) {
if (y == p_v.y) {
return z > p_v.z;
} else {
}
return y > p_v.y;
}
} else {
return x > p_v.x;
}
}
bool Vector3::operator<=(const Vector3 &p_v) const {
if (x == p_v.x) {
if (y == p_v.y) {
return z <= p_v.z;
} else {
}
return y < p_v.y;
}
} else {
return x < p_v.x;
}
}
bool Vector3::operator>=(const Vector3 &p_v) const {
if (x == p_v.x) {
if (y == p_v.y) {
return z >= p_v.z;
} else {
}
return y > p_v.y;
}
} else {
return x > p_v.x;
}
}
_FORCE_INLINE_ Vector3 vec3_cross(const Vector3 &p_a, const Vector3 &p_b) {
return p_a.cross(p_b);