summaryrefslogtreecommitdiffstats
path: root/src/math/Vector.h
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-11 02:48:36 +0200
committerGitHub <noreply@github.com>2019-07-11 02:48:36 +0200
commitaa449b6fe162d8960351c5fe164a9120b8572652 (patch)
treefa82496d356ac2b77ffa1ab00684b0150907f009 /src/math/Vector.h
parentfixfixfix (diff)
parentMerge pull request #129 from erorcun/erorcun (diff)
downloadre3-aa449b6fe162d8960351c5fe164a9120b8572652.tar
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.gz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.bz2
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.lz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.xz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.zst
re3-aa449b6fe162d8960351c5fe164a9120b8572652.zip
Diffstat (limited to 'src/math/Vector.h')
-rw-r--r--src/math/Vector.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/math/Vector.h b/src/math/Vector.h
index b49f00f2..de8092eb 100644
--- a/src/math/Vector.h
+++ b/src/math/Vector.h
@@ -22,15 +22,15 @@ 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 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); }
+ float Magnitude2D(void) const { return Sqrt(x*x + y*y); }
float MagnitudeSqr2D(void) const { return x*x + y*y; }
void Normalise(void) {
float sq = MagnitudeSqr();
if(sq > 0.0f){
- float invsqrt = 1.0f/sqrt(sq); // CMaths::RecipSqrt
+ float invsqrt = 1.0f/Sqrt(sq); // CMaths::RecipSqrt
x *= invsqrt;
y *= invsqrt;
z *= invsqrt;