1/ln(2) is equivalent to log2(e), so define it as such. log2(e) = ln(e)/ln(2) = 1/ln(2)
M_PI is updated to add some precision (value found in my math.h header). Signed-off-by: Matt Turner <matts...@gmail.com> --- src/mesa/main/compiler.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 5557a3b..4c52be2 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -351,7 +351,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) #ifndef M_PI -#define M_PI (3.1415926536) +#define M_PI (3.14159265358979323846) #endif #ifndef M_E @@ -363,7 +363,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) #endif #ifndef ONE_DIV_LN2 -#define ONE_DIV_LN2 (1.442695040888963456) +#define ONE_DIV_LN2 M_LOG2E #endif #ifndef ONE_DIV_SQRT_LN2 -- 1.7.2.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev