aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-04-28 01:14:17 -0700
committerChris Robinson <[email protected]>2018-04-28 01:14:17 -0700
commit54109043b82ca20fb0069d215930fb218f2e7c4f (patch)
tree9c48fd1df5c68bd63853a611cea6715b02b717c4 /Alc
parentddd4751f87bebfc87967bc3359da9604b2f3c4c6 (diff)
Remove some unnecessary floor calls
Diffstat (limited to 'Alc')
-rw-r--r--Alc/hrtf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index 7e5f6e96..affb6c27 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -217,16 +217,14 @@ void BuildBFormatHrtf(const struct Hrtf *Hrtf, DirectHrtfState *state, ALsizei N
ALuint azcount;
/* Calculate elevation index. */
- evidx = (ALsizei)floorf((F_PI_2 + AmbiPoints[c].Elev) *
- (Hrtf->evCount-1)/F_PI + 0.5f);
+ evidx = (ALsizei)((F_PI_2+AmbiPoints[c].Elev) * (Hrtf->evCount-1) / F_PI + 0.5f);
evidx = clampi(evidx, 0, Hrtf->evCount-1);
azcount = Hrtf->azCount[evidx];
evoffset = Hrtf->evOffset[evidx];
/* Calculate azimuth index for this elevation. */
- azidx = (ALsizei)floorf((F_TAU+AmbiPoints[c].Azim) *
- azcount/F_TAU + 0.5f) % azcount;
+ azidx = (ALsizei)((F_TAU+AmbiPoints[c].Azim) * azcount / F_TAU + 0.5f) % azcount;
/* Calculate indices for left and right channels. */
idx[c] = evoffset + azidx;