diff options
author | Chris Robinson <[email protected]> | 2008-10-09 02:32:47 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-10-09 02:32:47 -0700 |
commit | 87ff8a65e9e34ac26d34045b8bba373b6b2bd870 (patch) | |
tree | f2593046ca8f4fcd27158306433bd64ccf052910 | |
parent | 7b6f207790b07c9fa071e7a432229759ada30c2f (diff) |
Simplify the lerp function
-rw-r--r-- | Alc/ALu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -641,7 +641,7 @@ static ALvoid CalcSourceParams(ALCcontext *ALContext, ALsource *ALSource, static __inline ALshort lerp(ALshort val1, ALshort val2, ALint frac) { - return (val1*((1<<FRACTIONBITS)-frac) + val2*frac) >> FRACTIONBITS; + return val1 + (((val2-val1)*frac)>>FRACTIONBITS); } ALvoid aluMixData(ALCcontext *ALContext,ALvoid *buffer,ALsizei size,ALenum format) |