From 5e6482e17bcdbf43cfb99c891b76589f0611335a Mon Sep 17 00:00:00 2001 From: Vesa V Date: Sun, 30 Nov 2014 00:42:35 +0200 Subject: [PATCH] Update lmms_math.h better sqrt --- include/lmms_math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lmms_math.h b/include/lmms_math.h index 64e4f57ec..b6cc24362 100644 --- a/include/lmms_math.h +++ b/include/lmms_math.h @@ -232,7 +232,7 @@ static inline float sqrt_neg( float val ) float fastSqrt( float n ) { int i = *(int*) &n; - i = ( ( i - ( 1 << 23 ) ) >> 1 ) + ( 1 << 29 ); + i = ( i + ( 127 << 23 ) ) >> 1; return *(float*) &i; }