mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 11:58:10 +02:00
util: Optimise log2().
This commit is contained in:
parent
f447eea4de
commit
0d8637451b
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue