delegate to operator equals in operator not equals

This commit is contained in:
ZXShady 2024-09-29 23:01:29 +01:00 committed by Chris Thrasher
parent ea08388e7a
commit 71594d402e
2 changed files with 2 additions and 2 deletions

View File

@ -210,7 +210,7 @@ constexpr bool operator==(Vector2<T> left, Vector2<T> right)
template <typename T> template <typename T>
constexpr bool operator!=(Vector2<T> left, Vector2<T> right) constexpr bool operator!=(Vector2<T> left, Vector2<T> right)
{ {
return (left.x != right.x) || (left.y != right.y); return !(left == right);
} }

View File

@ -210,7 +210,7 @@ constexpr bool operator==(const Vector3<T>& left, const Vector3<T>& right)
template <typename T> template <typename T>
constexpr bool operator!=(const Vector3<T>& left, const Vector3<T>& right) constexpr bool operator!=(const Vector3<T>& left, const Vector3<T>& right)
{ {
return (left.x != right.x) || (left.y != right.y) || (left.z != right.z); return !(left == right);
} }
} // namespace sf } // namespace sf