From 1458cb9321f8ec62e51f348faa669df048cbd354 Mon Sep 17 00:00:00 2001 From: Kyle De'Vir Date: Sun, 29 May 2016 04:12:36 +1000 Subject: [PATCH] Revert adding HMM_FastInverseSquareRoot Not useful anymore. --- HandmadeMath.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/HandmadeMath.h b/HandmadeMath.h index eb72c85..8db5f05 100644 --- a/HandmadeMath.h +++ b/HandmadeMath.h @@ -223,7 +223,6 @@ HMMDEF float HMM_ToRadians(float Degrees); HMMDEF float HMM_Inner(hmm_vec3 A, hmm_vec3 B); HMMDEF float HMM_SquareRoot(float Float); HMMDEF float HMM_LengthSquareRoot(hmm_vec3 A); -HMMDEF float HMM_FastInverseSquareRoot(float Number); HMMDEF float HMM_Length(hmm_vec3 A); HMMDEF float HMM_Power(float Base, int Exponent); HMMDEF float HMM_Clamp(float Min, float Value, float Max); @@ -352,24 +351,6 @@ HMM_LengthSquareRoot(hmm_vec3 A) return (Result); } -HINLINE float -HMM_FastInverseSquareRoot(float Number) -{ - long i; - float x2, y; - const float threehalfs = 1.5f; - - x2 = Number * 0.5f; - y = Number; - i = * ( long * ) &y; // evil floating point bit level hacking - i = 0x5f3759df - ( i >> 1 ); // what the fuck? - y = * ( float * ) &i; - - y = y * ( threehalfs - ( x2 * y * y ) ); - - return ( y ); -} - HINLINE float HMM_Length(hmm_vec3 A) {