diff options
author | Chris Robinson <[email protected]> | 2019-09-16 21:49:06 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-16 21:49:06 -0700 |
commit | 1da75126283cbd0f7ed3835a34c6e34e8dcfc32a (patch) | |
tree | 9c82a417846b6a23ffeb2128c476126b40f20e1b /alc/alu.cpp | |
parent | 62972babea90f8f0444d4dbaaabe9e017cc0abfb (diff) |
Avoid an unnecessary multiply
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<float>::Pi()*0.5f)) - return minf(abs_azi*scale, al::MathDefs<float>::Pi()*0.5f) * std::copysign(1.0f, azimuth); + if(!(abs_azi >= al::MathDefs<float>::Pi()*0.5f)) + return std::copysign(minf(abs_azi*scale, al::MathDefs<float>::Pi()*0.5f), azimuth); return azimuth; } |