fix operator- for Vector
All checks were successful
Linux arm64 / Build (push) Successful in 4m41s

This commit is contained in:
2024-03-28 16:14:01 +01:00
parent f9b79b0d64
commit 507946a0f4

View File

@@ -120,7 +120,7 @@ constexpr Vec2<T> operator-(const Vec2<T>& vect) {
template <typename T>
constexpr Vec2<T> operator-(const Vec2<T>& vect, const Vec2<T>& other) {
return vect + (-other);
return {vect.x - other.x, vect.y - other.y};
}
template <typename T>
@@ -251,7 +251,7 @@ Vec4<T>& operator+=(Vec4<T>& vect, const Vec4<T>& other) {
template <typename T>
constexpr Vec4<T> operator-(const Vec4<T>& vect, const Vec4<T>& other) {
return vect + (-other);
return {vect.x - other.x, vect.y - other.y, vect.z - other.z, vect.w - other.w};
}
template <typename T>