Skip to content

Commit 6a1b8a5

Browse files
committed
Added overloaded Number multiplication operator for Vector2
1 parent 5f660b6 commit 6a1b8a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Core/Contents/Include/PolyVector2.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ namespace Polycode {
7676
inline Vector2 operator * (const Number val) const {
7777
return Vector2(x * val, y * val);
7878
}
79+
80+
inline Vector2 operator * (const Vector2 &v2) const {
81+
return Vector2(x * v2.x, y * v2.y);
82+
}
7983

8084
inline Vector2 operator / (const Number val) const {
8185
assert( val != 0.0 );

0 commit comments

Comments
 (0)