diff --git a/MantleAPI/include/MantleAPI/Common/vector.h b/MantleAPI/include/MantleAPI/Common/vector.h index 73df1bf6f1a840aebef2317ed0ca66a1949b8fe3..e8e5e4b746d5a2550ca8ff3958d5e296f329109c 100644 --- a/MantleAPI/include/MantleAPI/Common/vector.h +++ b/MantleAPI/include/MantleAPI/Common/vector.h @@ -29,6 +29,11 @@ struct Vec3 T z{0}; inline T Length() const { return units::math::sqrt((x * x) + (y * y) + (z * z)); } + + inline Vec3<T> operator-() const noexcept + { + return {-x, -y, -z}; + } }; template <typename T>