summaryrefslogtreecommitdiffstats
path: root/src/math/Vector2D.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-26 01:32:38 +0200
committerGitHub <noreply@github.com>2019-07-26 01:32:38 +0200
commita9f4ba12d7aeccdff8a021b28956fe5a993a5eac (patch)
tree0351cb51adcacf2cdf0f006d23e2ce7bd8081e3c /src/math/Vector2D.h
parentimplemented CAutomobile::TankControl (diff)
parentPed & fixes, including peds dive into danger fix (diff)
downloadre3-a9f4ba12d7aeccdff8a021b28956fe5a993a5eac.tar
re3-a9f4ba12d7aeccdff8a021b28956fe5a993a5eac.tar.gz
re3-a9f4ba12d7aeccdff8a021b28956fe5a993a5eac.tar.bz2
re3-a9f4ba12d7aeccdff8a021b28956fe5a993a5eac.tar.lz
re3-a9f4ba12d7aeccdff8a021b28956fe5a993a5eac.tar.xz
re3-a9f4ba12d7aeccdff8a021b28956fe5a993a5eac.tar.zst
re3-a9f4ba12d7aeccdff8a021b28956fe5a993a5eac.zip
Diffstat (limited to 'src/math/Vector2D.h')
-rw-r--r--src/math/Vector2D.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/math/Vector2D.h b/src/math/Vector2D.h
index e6b04c14..caba9146 100644
--- a/src/math/Vector2D.h
+++ b/src/math/Vector2D.h
@@ -7,6 +7,7 @@ public:
CVector2D(void) {}
CVector2D(float x, float y) : x(x), y(y) {}
CVector2D(const CVector &v) : x(v.x), y(v.y) {}
+ float Heading(void) const { return Atan2(-x, y); }
float Magnitude(void) const { return Sqrt(x*x + y*y); }
float MagnitudeSqr(void) const { return x*x + y*y; }