From cbfc33215b856b922468362126d7a7485d7cdb20 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 27 Jan 2009 07:11:58 -0800 Subject: [PATCH] Use M_PI since it is sure to be defined --- Alc/ALu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Alc/ALu.c b/Alc/ALu.c index e934b6cd..be48ee90 100644 --- a/Alc/ALu.c +++ b/Alc/ALu.c @@ -731,8 +731,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, WetMix = __max(WetMix,MinVolume); //3. Apply directional soundcones - Angle = aluAcos(aluDotproduct(Direction,SourceToListener)) * 180.0f / - 3.141592654f; + Angle = aluAcos(aluDotproduct(Direction,SourceToListener)) * 180.0f/M_PI; if(Angle >= InnerAngle && Angle <= OuterAngle) { ALfloat scale = (Angle-InnerAngle) / (OuterAngle-InnerAngle); @@ -851,7 +850,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, *wetsend = WetMix; // Update filter coefficients. Calculations based on the I3DL2 spec. - cw = cos(2.0f*3.141592654f * LOWPASSFREQCUTOFF / ALContext->Frequency); + cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / ALContext->Frequency); // We use four chained one-pole filters, so we need to take the fourth // root of the squared gain, which is the same as the square root of // the base gain. @@ -898,7 +897,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, drysend[LFE] = DryMix * ListenerGain; *wetsend = 0.0f; - cw = cos(2.0f*3.141592654f * LOWPASSFREQCUTOFF / ALContext->Frequency); + cw = cos(2.0*M_PI * LOWPASSFREQCUTOFF / ALContext->Frequency); g = __max(DryGainHF, 0.01f); a = 0.0f; if(g < 0.9999f) // 1-epsilon -- 2.11.4.GIT