modlfo / libfixmath

Automatically exported from code.google.com/p/libfixmath
0 stars 0 forks source link

lerp overflows #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. fix16_lerp16(fix16_from_int(0), fix16_from_int(10),32768)

What is the expected output? What do you see instead?
expected fix16 version of 5 (327680), actual is 0.

What version of the product are you using? On what operating system?
revision 91,  MacOS Mavericks Xcode 5.1.1

Please provide any additional information below.
The MACRO
static inline int64_t int64_mul_i32_i32(int32_t x, int32_t y) { return (x * y); 
 }

needs to coerce the int32_t values to int64_t.  
Also, the unit tests do not cover lerp functions at all.

Original issue reported on code.google.com by rmidt...@gmail.com on 11 Aug 2014 at 8:35