ref: 7f3fb20185e4f23392b6a9674c274738a58e7283
parent: 2ff6556f1fbf93be4f58b3e132859082941890f8
author: Jean-Marc Valin <[email protected]>
date: Thu Aug 11 19:23:46 EDT 2016
Fixes problem with M_PI
--- 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 @@
#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 @@
#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))