Permalink
Browse files

Fix lerp16by16 where uint32_t should be uint16_t

scale16 returns a uint16_t and it doesn't seem necessary to upcast.
  • Loading branch information...
leebyron committed Oct 1, 2018
1 parent 38105c6 commit 3a70156464be4f557b4438da9904baae8c4d278c
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib8tion.h
@@ -477,7 +477,7 @@ LIB8STATIC uint16_t lerp16by16( uint16_t a, uint16_t b, fract16 frac)
uint16_t result;
if( b > a ) {
uint16_t delta = b - a;
uint32_t scaled = scale16(delta, frac);
uint16_t scaled = scale16(delta, frac);
result = a + scaled;
} else {
uint16_t delta = a - b;

0 comments on commit 3a70156

Please sign in to comment.