diff --git a/include/Nazara/Math/Vector2.inl b/include/Nazara/Math/Vector2.inl index a9afe0de7..3f41b80d1 100644 --- a/include/Nazara/Math/Vector2.inl +++ b/include/Nazara/Math/Vector2.inl @@ -426,7 +426,10 @@ bool NzVector2::operator<(const NzVector2& vec) const template bool NzVector2::operator<=(const NzVector2& vec) const { - return operator<(vec) || operator==(vec); + if (x == vec.x) + return y <= vec.y; + else + return x < vec.x; } template diff --git a/include/Nazara/Math/Vector3.inl b/include/Nazara/Math/Vector3.inl index e070f8714..acaf98694 100644 --- a/include/Nazara/Math/Vector3.inl +++ b/include/Nazara/Math/Vector3.inl @@ -490,7 +490,15 @@ bool NzVector3::operator<(const NzVector3& vec) const template bool NzVector3::operator<=(const NzVector3& vec) const { - return operator<(vec) || operator==(vec); + if (x == vec.x) + { + if (y < vec.y) + return z <= vec.z; + else + return y < vec.y; + } + else + return x < vec.x; } template diff --git a/include/Nazara/Math/Vector4.inl b/include/Nazara/Math/Vector4.inl index e3c7706b1..fd116e51d 100644 --- a/include/Nazara/Math/Vector4.inl +++ b/include/Nazara/Math/Vector4.inl @@ -447,7 +447,20 @@ bool NzVector4::operator<(const NzVector4& vec) const template bool NzVector4::operator<=(const NzVector4& vec) const { - return operator<(vec) || operator==(vec); + if (x == vec.x) + { + if (y == vec.y) + { + if (z == vec.z) + return w <= vec.w; + else + return z < vec.z; + } + else + return y < vec.y; + } + else + return x < vec.x; } template