aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-08-29 03:51:17 -0700
committerChris Robinson <[email protected]>2018-08-29 03:53:09 -0700
commit21dc2c761d87592feb8b42a4556e2786f2e4581f (patch)
treedd451ac272dd3d0b669092f270c6b86b3e89fc0b /OpenAL32
parent529f387695d10368aca3460baa428ee90eea8332 (diff)
Check for and use copysignf
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alu.h2
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;