summaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-19 14:06:13 +0200
committeraap <aap@papnet.eu>2019-06-19 14:06:13 +0200
commit78e33785ecfd176616b1a1b1588c771b978a4c19 (patch)
tree6abde4ca51c0f477ce63288215b510a462e52e50 /src/math
parentMerge pull request #22 from erorcun/master (diff)
downloadre3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar
re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.gz
re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.bz2
re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.lz
re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.xz
re3-78e33785ecfd176616b1a1b1588c771b978a4c19.tar.zst
re3-78e33785ecfd176616b1a1b1588c771b978a4c19.zip
Diffstat (limited to 'src/math')
-rw-r--r--src/math/Vector2D.h6
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;