diff --git a/include/Nazara/Math/Vector2.inl b/include/Nazara/Math/Vector2.inl index 3889aaa78..5b9d58261 100644 --- a/include/Nazara/Math/Vector2.inl +++ b/include/Nazara/Math/Vector2.inl @@ -342,7 +342,7 @@ bool NzVector2::operator!=(const NzVector2& vec) const template bool NzVector2::operator<(const NzVector2& vec) const { - return x < vec.x && y < vec.y; + return (x != vec.x) ? x < vec.x : y < vec.y; } template diff --git a/include/Nazara/Math/Vector3.inl b/include/Nazara/Math/Vector3.inl index 73eff32fe..9a40aac0f 100644 --- a/include/Nazara/Math/Vector3.inl +++ b/include/Nazara/Math/Vector3.inl @@ -374,7 +374,7 @@ bool NzVector3::operator!=(const NzVector3& vec) const template bool NzVector3::operator<(const NzVector3& vec) const { - return x < vec.x && y < vec.y && z < vec.z; + return (x != vec.x) ? x < vec.x : (y != vec.y) ? y < vec.y : z < vec.z; } template diff --git a/include/Nazara/Math/Vector4.inl b/include/Nazara/Math/Vector4.inl index e5ec906fd..918e588a5 100644 --- a/include/Nazara/Math/Vector4.inl +++ b/include/Nazara/Math/Vector4.inl @@ -339,7 +339,7 @@ bool NzVector4::operator!=(const NzVector4& vec) const template bool NzVector4::operator<(const NzVector4& vec) const { - return x < vec.x && y < vec.y && z < vec.z && w < vec.w; + return (x != vec.x) ? x < vec.x : (y != vec.y) ? y < vec.y : (z != vec.z) ? z < vec.z : w < vec.w; } template