diff options
Diffstat (limited to 'src/math/Vector2D.h')
-rw-r--r-- | src/math/Vector2D.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/math/Vector2D.h b/src/math/Vector2D.h index 3c0013d4..fa32bd9b 100644 --- a/src/math/Vector2D.h +++ b/src/math/Vector2D.h @@ -31,6 +31,12 @@ public: }; inline float +DotProduct2D(const CVector2D &v1, const CVector2D &v2) +{ + return v1.x*v2.x + v1.y*v2.y; +} + +inline float CrossProduct2D(const CVector2D &v1, const CVector2D &v2) { return v1.x*v2.y - v1.y*v2.x; |