diff options
author | aap <aap@papnet.eu> | 2019-07-26 01:34:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 01:34:32 +0200 |
commit | 8804aafc6a9f7cd69f51e248546d2f889e65c242 (patch) | |
tree | f86d3d0e5b4ec32026775eb9ede17e894d6ca40e /src/math/Vector2D.h | |
parent | Running script part 3 (diff) | |
parent | Merge pull request #162 from erorcun/erorcun (diff) | |
download | re3-8804aafc6a9f7cd69f51e248546d2f889e65c242.tar re3-8804aafc6a9f7cd69f51e248546d2f889e65c242.tar.gz re3-8804aafc6a9f7cd69f51e248546d2f889e65c242.tar.bz2 re3-8804aafc6a9f7cd69f51e248546d2f889e65c242.tar.lz re3-8804aafc6a9f7cd69f51e248546d2f889e65c242.tar.xz re3-8804aafc6a9f7cd69f51e248546d2f889e65c242.tar.zst re3-8804aafc6a9f7cd69f51e248546d2f889e65c242.zip |
Diffstat (limited to 'src/math/Vector2D.h')
-rw-r--r-- | src/math/Vector2D.h | 1 |
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; } |