summaryrefslogtreecommitdiffstats
path: root/src/math/Vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/Vector.h')
-rw-r--r--src/math/Vector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/math/Vector.h b/src/math/Vector.h
index 3dba07ca..d89ca375 100644
--- a/src/math/Vector.h
+++ b/src/math/Vector.h
@@ -101,6 +101,11 @@ inline CVector operator*(const CVector &left, float right)
return CVector(left.x * right, left.y * right, left.z * right);
}
+inline CVector operator*(float left, const CVector &right)
+{
+ return CVector(left * right.x, left * right.y, left * right.z);
+}
+
inline CVector operator/(const CVector &left, float right)
{
return CVector(left.x / right, left.y / right, left.z / right);