diff options
author | Chris Robinson <[email protected]> | 2018-08-29 03:51:17 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-08-29 03:53:09 -0700 |
commit | 21dc2c761d87592feb8b42a4556e2786f2e4581f (patch) | |
tree | dd451ac272dd3d0b669092f270c6b86b3e89fc0b /OpenAL32/Include/alu.h | |
parent | 529f387695d10368aca3460baa428ee90eea8332 (diff) |
Check for and use copysignf
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r-- | OpenAL32/Include/alu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h index ed318ada..c3e6ba12 100644 --- a/OpenAL32/Include/alu.h +++ b/OpenAL32/Include/alu.h @@ -484,7 +484,7 @@ inline void CalcAngleCoeffs(ALfloat azimuth, ALfloat elevation, ALfloat spread, */ inline float ScaleAzimuthFront(float azimuth, float scale) { - ALfloat sign = (azimuth < 0.0f) ? -1.0f : 1.0f; + ALfloat sign = copysignf(1.0f, azimuth); if(!(fabsf(azimuth) > F_PI_2)) return minf(fabsf(azimuth) * scale, F_PI_2) * sign; return azimuth; |