aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/panning.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-09-19 19:53:25 -0700
committerChris Robinson <[email protected]>2018-09-19 19:53:25 -0700
commit48b7745a49296bd70e16fbf8eeed2d47c84e72a9 (patch)
treeeec7bdf5ff04e65188aee24b5b3978c0cbffbf0e /Alc/panning.c
parent9ef4dd42474c3ecc266362df47fd5a6cca8dcbb4 (diff)
Add macros for commonly used square roots
Diffstat (limited to 'Alc/panning.c')
-rw-r--r--Alc/panning.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/panning.c b/Alc/panning.c
index d114295b..ce0550cf 100644
--- a/Alc/panning.c
+++ b/Alc/panning.c
@@ -75,9 +75,9 @@ void CalcAmbiCoeffs(const ALfloat y, const ALfloat z, const ALfloat x, const ALf
/* Zeroth-order */
coeffs[0] = 1.0f; /* ACN 0 = 1 */
/* First-order */
- coeffs[1] = 1.732050808f * y; /* ACN 1 = sqrt(3) * Y */
- coeffs[2] = 1.732050808f * z; /* ACN 2 = sqrt(3) * Z */
- coeffs[3] = 1.732050808f * x; /* ACN 3 = sqrt(3) * X */
+ coeffs[1] = SQRTF_3 * y; /* ACN 1 = sqrt(3) * Y */
+ coeffs[2] = SQRTF_3 * z; /* ACN 2 = sqrt(3) * Z */
+ coeffs[3] = SQRTF_3 * x; /* ACN 3 = sqrt(3) * X */
/* Second-order */
coeffs[4] = 3.872983346f * x * y; /* ACN 4 = sqrt(15) * X * Y */
coeffs[5] = 3.872983346f * y * z; /* ACN 5 = sqrt(15) * Y * Z */