summaryrefslogtreecommitdiffstats
path: root/src/math/Vector.h
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2019-08-02 22:23:05 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2019-08-02 22:23:05 +0200
commit73e2a4b035e19ace0ad5c55c58a15ee1d8265fee (patch)
treeeafd98b48c650c84139804ca89259ae61e00e3ea /src/math/Vector.h
parentfix (diff)
parentrestore original shadows fading (diff)
downloadre3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.gz
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.bz2
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.lz
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.xz
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.zst
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.zip
Diffstat (limited to 'src/math/Vector.h')
-rw-r--r--src/math/Vector.h6
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; }
};