From 21dc2c761d87592feb8b42a4556e2786f2e4581f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 29 Aug 2018 03:51:17 -0700 Subject: Check for and use copysignf --- OpenAL32/Include/alu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenAL32/Include/alu.h') 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; -- cgit v1.2.3