diff options
author | Chris Robinson <[email protected]> | 2018-04-28 01:14:17 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-04-28 01:14:17 -0700 |
commit | 54109043b82ca20fb0069d215930fb218f2e7c4f (patch) | |
tree | 9c48fd1df5c68bd63853a611cea6715b02b717c4 /Alc | |
parent | ddd4751f87bebfc87967bc3359da9604b2f3c4c6 (diff) |
Remove some unnecessary floor calls
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/hrtf.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; |