From 1da75126283cbd0f7ed3835a34c6e34e8dcfc32a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 16 Sep 2019 21:49:06 -0700 Subject: Avoid an unnecessary multiply --- alc/alu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alc/alu.cpp') diff --git a/alc/alu.cpp b/alc/alu.cpp index b0405822..606d8fdb 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -400,8 +400,8 @@ bool CalcEffectSlotParams(ALeffectslot *slot, ALCcontext *context) inline float ScaleAzimuthFront(float azimuth, float scale) { const ALfloat abs_azi{std::fabs(azimuth)}; - if(!(abs_azi > al::MathDefs::Pi()*0.5f)) - return minf(abs_azi*scale, al::MathDefs::Pi()*0.5f) * std::copysign(1.0f, azimuth); + if(!(abs_azi >= al::MathDefs::Pi()*0.5f)) + return std::copysign(minf(abs_azi*scale, al::MathDefs::Pi()*0.5f), azimuth); return azimuth; } -- cgit v1.2.3