summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-09-13 00:44:48 -0700
committerChris Robinson <[email protected]>2008-09-13 00:44:48 -0700
commit26e8ea60a5e6e631aaf337f0d02aeb4c6a85a462 (patch)
tree448402b33bc3ebbb4239146e0709549de00d0b69
parentf4ea188ffa8ab38de3b63f494ef41569a3c4b47a (diff)
Store pi as a static const
-rw-r--r--Alc/lpfilter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/lpfilter.c b/Alc/lpfilter.c
index 2496f007..9f65cf3b 100644
--- a/Alc/lpfilter.c
+++ b/Alc/lpfilter.c
@@ -212,10 +212,9 @@ static void prewarp(
double *a0, double *a1, double *a2,
double fc, double fs)
{
- double wp, pi;
+ static const double pi = 3.141592653589793238;
- pi = 4.0 * atan(1.0);
- wp = 2.0 * fs * tan(pi * fc / fs);
+ double wp = 2.0 * fs * tan(pi * fc / fs);
*a2 = (*a2) / (wp * wp);
*a1 = (*a1) / wp;