diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-28 14:52:39 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-07-28 14:52:39 +0200 |
commit | f7c93fc15c9b9b45a3022433379ff967443a2c74 (patch) | |
tree | 9db8a9057d0b96fac16bdb9f76796c87e5283706 /src/math/Vector.h | |
parent | fixed phones (diff) | |
parent | Merge branch 'master' of github.com:GTAmodding/re3 (diff) | |
download | re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.gz re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.bz2 re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.lz re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.xz re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.tar.zst re3-f7c93fc15c9b9b45a3022433379ff967443a2c74.zip |
Diffstat (limited to 'src/math/Vector.h')
-rw-r--r-- | src/math/Vector.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/math/Vector.h b/src/math/Vector.h index f794a57f..42087339 100644 --- a/src/math/Vector.h +++ b/src/math/Vector.h @@ -31,7 +31,7 @@ public: void Normalise(void) { float sq = MagnitudeSqr(); if(sq > 0.0f){ - float invsqrt = 1.0f/Sqrt(sq); // CMaths::RecipSqrt + float invsqrt = RecipSqrt(sq); x *= invsqrt; y *= invsqrt; z *= invsqrt; @@ -71,6 +71,10 @@ public: return CVector(-x, -y, -z); } + const bool operator==(CVector const &right) { + return x == right.x && y == right.y && z == right.z; + } + bool IsZero(void) { return x == 0.0f && y == 0.0f && z == 0.0f; } }; |