From 6ff921c160e802c12ad40b06f17a93f72eea6bdf Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 28 Jul 2019 13:14:08 +0200 Subject: CAutomobile::PreRender; whole class finished --- src/math/Vector.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/math/Vector.h') 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; } }; -- cgit v1.2.3