util: Optimise log2().

This commit is contained in:
Michal Krol
2008-11-12 19:01:46 +01:00
parent 87f77105ce
commit c5ba8ba918
+2 -1
View File
@@ -163,7 +163,8 @@ static INLINE float logf( float f )
static INLINE double log2( double x )
{
return log( x ) / log( 2.0 );
const double invln2 = 1.442695041;
return log( x ) * invln2;
}
#else