summaryrefslogtreecommitdiffstats
path: root/src/math/Vector.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-06-29 17:05:16 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-06-29 17:05:16 +0200
commit1d620f4b6740ba7e44fd7885462c7ef040a89f77 (patch)
treecea8dd2512beda0e5e973df75c17c08401aeaa8d /src/math/Vector.h
parentmore replay stuff, bug fix (diff)
parentfix (diff)
downloadre3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar
re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.gz
re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.bz2
re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.lz
re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.xz
re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.tar.zst
re3-1d620f4b6740ba7e44fd7885462c7ef040a89f77.zip
Diffstat (limited to 'src/math/Vector.h')
-rw-r--r--src/math/Vector.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/math/Vector.h b/src/math/Vector.h
index 60fcdee5..2c431d0d 100644
--- a/src/math/Vector.h
+++ b/src/math/Vector.h
@@ -22,6 +22,7 @@ public:
return *((RwV3d*)this);
}
#endif
+ float Heading(void) const { return atan2(-x, y); }
float Magnitude(void) const { return sqrt(x*x + y*y + z*z); }
float MagnitudeSqr(void) const { return x*x + y*y + z*z; }
float Magnitude2D(void) const { return sqrt(x*x + y*y); }