Browse Source

Added overloaded Number multiplication operator for Vector2

Ivan Safrin 11 years ago
parent
commit
6a1b8a5969
1 changed files with 4 additions and 0 deletions
  1. 4 0
      Core/Contents/Include/PolyVector2.h

+ 4 - 0
Core/Contents/Include/PolyVector2.h

@@ -76,6 +76,10 @@ namespace Polycode {
 			inline Vector2 operator * (const Number val) const {
 				return Vector2(x * val, y * val);
 			}
+        
+            inline Vector2 operator * (const Vector2 &v2) const {
+                return Vector2(x * v2.x, y * v2.y);
+            }
 
 			inline Vector2 operator / (const Number val) const {
 				assert( val != 0.0 );