summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-08-11 23:23:46 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-08-11 23:23:46 -0400
commit7f3fb20185e4f23392b6a9674c274738a58e7283 (patch)
treee9e0784847b55bdda034b9e0dfb7a77b853a971d
parent2ff6556f1fbf93be4f58b3e132859082941890f8 (diff)
downloadopus-7f3fb20185e4f23392b6a9674c274738a58e7283.tar.gz
Fixes problem with M_PI
-rw-r--r--celt/mathops.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/celt/mathops.h b/celt/mathops.h
index 948df655..1f8a20cb 100644
--- a/celt/mathops.h
+++ b/celt/mathops.h
@@ -38,6 +38,8 @@
#include "entcode.h"
#include "os_support.h"
+#define PI 3.141592653f
+
/* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */
#define FRAC_MUL16(a,b) ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15)
@@ -48,7 +50,7 @@ unsigned isqrt32(opus_uint32 _val);
#define cA 0.43157974f
#define cB 0.67848403f
#define cC 0.08595542f
-#define cE ((float)M_PI/2)
+#define cE ((float)PI/2)
static OPUS_INLINE float fast_atan2f(float y, float x) {
float x2, y2;
x2 = x*x;
@@ -111,7 +113,6 @@ static OPUS_INLINE opus_val32 celt_maxabs32(const opus_val32 *x, int len)
#ifndef FIXED_POINT
-#define PI 3.141592653f
#define celt_sqrt(x) ((float)sqrt(x))
#define celt_rsqrt(x) (1.f/celt_sqrt(x))
#define celt_rsqrt_norm(x) (celt_rsqrt(x))