From 7bf833785411955c2bcf35ed55e9d206facbc575 Mon Sep 17 00:00:00 2001 From: aap Date: Sun, 24 May 2020 15:14:27 +0200 Subject: CVehicle --- src/math/Vector2D.h | 4 +--- src/math/math.cpp | 13 ------------- 2 files changed, 1 insertion(+), 16 deletions(-) (limited to 'src/math') diff --git a/src/math/Vector2D.h b/src/math/Vector2D.h index 0885a5d2..7bfccae6 100644 --- a/src/math/Vector2D.h +++ b/src/math/Vector2D.h @@ -11,9 +11,7 @@ public: float Magnitude(void) const { return Sqrt(x*x + y*y); } float MagnitudeSqr(void) const { return x*x + y*y; } - void Normalise(void); - - void NormaliseSafe(void) { + void Normalise(void) { float sq = MagnitudeSqr(); if(sq > 0.0f){ float invsqrt = RecipSqrt(sq); diff --git a/src/math/math.cpp b/src/math/math.cpp index eeb9d3fa..e11d048c 100644 --- a/src/math/math.cpp +++ b/src/math/math.cpp @@ -4,19 +4,6 @@ // TODO: move more stuff into here -void -CVector2D::Normalise(void) -{ - float sq = MagnitudeSqr(); - assert(sq != 0.0f); // just be safe here - //if(sq > 0.0f){ - float invsqrt = RecipSqrt(sq); - x *= invsqrt; - y *= invsqrt; - //}else - // x = 1.0f; -} - void CMatrix::SetRotate(float xAngle, float yAngle, float zAngle) { -- cgit v1.2.3