From 0acbdc7755e925e7ba498583ca0252e1a04a10db Mon Sep 17 00:00:00 2001 From: Ken Cooke Date: Wed, 28 Jun 2017 10:18:54 -0700 Subject: [PATCH] CR fix: use predefined PI --- libraries/shared/src/AudioHelpers.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/shared/src/AudioHelpers.h b/libraries/shared/src/AudioHelpers.h index d75733e678..1dcc11af0c 100644 --- a/libraries/shared/src/AudioHelpers.h +++ b/libraries/shared/src/AudioHelpers.h @@ -14,6 +14,8 @@ #include +#include + const int IEEE754_MANT_BITS = 23; const int IEEE754_EXPN_BIAS = 127; @@ -105,7 +107,7 @@ static inline float fastAcosf(float x) { xi.f = ((-0.0198439236f * xi.f + 0.0762021306f) * xi.f + -0.212940971f) * xi.f + 1.57079633f; xi.f *= r; - return (sign ? 3.141592654f - xi.f : xi.f); + return (sign ? PI - xi.f : xi.f); } //