Fix handling of w in Vec4 operators

This commit is contained in:
baldurk
2020-04-07 18:34:15 +01:00
parent 38abf04909
commit 1690d30621
+3 -3
View File
@@ -111,17 +111,17 @@ inline Vec3f operator+=(Vec3f &a, const Vec3f &b)
inline Vec4f operator*(const Vec4f &a, const float b)
{
return Vec4f(a.x * b, a.y * b, a.z * b);
return Vec4f(a.x * b, a.y * b, a.z * b, a.w * b);
}
inline Vec4f operator+(const Vec4f &a, const Vec4f &b)
{
return Vec4f(a.x + b.x, a.y + b.y, a.z + b.z);
return Vec4f(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w);
}
inline Vec4f operator-(const Vec4f &a)
{
return Vec4f(-a.x, -a.y, -a.z);
return Vec4f(-a.x, -a.y, -a.z, -a.w);
}
inline Vec4f operator-(const Vec4f &a, const Vec4f &b)