Store pi as a static const

This commit is contained in:
Chris Robinson 2008-09-13 00:44:48 -07:00
parent f4ea188ffa
commit 26e8ea60a5

View File

@ -212,10 +212,9 @@ static void prewarp(
double *a0, double *a1, double *a2, double *a0, double *a1, double *a2,
double fc, double fs) double fc, double fs)
{ {
double wp, pi; static const double pi = 3.141592653589793238;
pi = 4.0 * atan(1.0); double wp = 2.0 * fs * tan(pi * fc / fs);
wp = 2.0 * fs * tan(pi * fc / fs);
*a2 = (*a2) / (wp * wp); *a2 = (*a2) / (wp * wp);
*a1 = (*a1) / wp; *a1 = (*a1) / wp;