From: Michal Krol Date: Wed, 12 Nov 2008 16:14:07 +0000 (+0100) Subject: util: Add log2() definition for MSC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50357ad35181b7b170abe8413d4ef772978aa5f5;p=mesa.git util: Add log2() definition for MSC. --- diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index d2eaa2e7f75..62272110ce3 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -161,6 +161,11 @@ static INLINE float logf( float f ) return (float) log( (double) f ); } +static INLINE double log2( double x ) +{ + return log( x ) / log( 2.0 ); +} + #else /* Work-around an extra semi-colon in VS 2005 logf definition */ #ifdef logf