1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use explicit value for 1/log2(10).

This commit is contained in:
Bartosz Taudul 2018-06-06 01:52:46 +02:00
parent 39c1b20184
commit 60b24249d3

View File

@ -163,11 +163,9 @@ tracy_force_inline float log2fast( float x )
return t2 + e;
}
static const float i10 = 1.f / log2f( 10 );
tracy_force_inline float log10fast( float x )
{
return log2fast( x ) * i10;
return log2fast( x ) * 0.301029995663981195213738894724493026768189881462108541310f; // 1/log2(10)
}
enum { MinVisSize = 3 };