mesa: replace ONE_DIV_LN2 constant with M_LOG2E
[mesa.git] / src / mesa / program / prog_statevars.c
index d94d7fe5dfbe7c0c63424070c373b64df5760a28..16f9690e8659746d6428b6f7ec528481ae9754a4 100644 (file)
@@ -459,7 +459,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
          value[0] = (ctx->Fog.End == ctx->Fog.Start)
             ? 1.0f : (GLfloat)(-1.0F / (ctx->Fog.End - ctx->Fog.Start));
          value[1] = ctx->Fog.End * -value[0];
-         value[2] = (GLfloat)(ctx->Fog.Density * ONE_DIV_LN2);
+         value[2] = (GLfloat)(ctx->Fog.Density * M_LOG2E); /* M_LOG2E == 1/ln(2) */
          value[3] = (GLfloat)(ctx->Fog.Density * ONE_DIV_SQRT_LN2);
          return;