summaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-06-29 11:09:33 +0200
committeraap <aap@papnet.eu>2019-06-29 11:09:33 +0200
commitb2f8c7eb23f9def86acb84ba2936041ded0db748 (patch)
treedf7bda7922a10f05de1ca758a3fa463786ed28ea /src/math
parentforgot the actual file... (diff)
downloadre3-b2f8c7eb23f9def86acb84ba2936041ded0db748.tar
re3-b2f8c7eb23f9def86acb84ba2936041ded0db748.tar.gz
re3-b2f8c7eb23f9def86acb84ba2936041ded0db748.tar.bz2
re3-b2f8c7eb23f9def86acb84ba2936041ded0db748.tar.lz
re3-b2f8c7eb23f9def86acb84ba2936041ded0db748.tar.xz
re3-b2f8c7eb23f9def86acb84ba2936041ded0db748.tar.zst
re3-b2f8c7eb23f9def86acb84ba2936041ded0db748.zip
Diffstat (limited to 'src/math')
-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); }