Issue 31 in libfixmath: lerp overflows

11 views
Skip to first unread message

libfi...@googlecode.com

unread,
Aug 11, 2014, 4:35:33 PM8/11/14
to libfi...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 31 by rmidt...@gmail.com: lerp overflows
http://code.google.com/p/libfixmath/issues/detail?id=31

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.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages