diff --git a/engine/inc/math/vec4.hpp b/engine/inc/math/vec4.hpp index 29cbf42..f688f92 100644 --- a/engine/inc/math/vec4.hpp +++ b/engine/inc/math/vec4.hpp @@ -56,6 +56,7 @@ class Vec4 { Vec4 operator*(const Vec4& v) const; Vec4 operator*(const float& v) const; Vec4 operator/(const float& v) const; + Vec4 operator/(const Vec4& v) const; Vec4 operator-(void) const; void operator=(const Vec4& v); void operator+=(const Vec4& v); diff --git a/engine/src/math/vec4.cpp b/engine/src/math/vec4.cpp index 559edf0..a01fc6f 100644 --- a/engine/src/math/vec4.cpp +++ b/engine/src/math/vec4.cpp @@ -77,6 +77,10 @@ Vec4 Vec4::operator/(const float& v) const { return Vec4(x / v, y / v, z / v, w); } +Vec4 Vec4::operator/(const Vec4& v) const { + return Vec4(x / v.x, y / v.y, z / v.z, w); +} + void Vec4::operator+=(const Vec4& v) { asm volatile( "lqc2 $vf4, 0x0(%0) \n\t"