Advertisement

Lerp vs fastLerp

Started by November 27, 2015 09:09 AM
10 comments, last by alvaro 9 years, 2 months ago
This is a useful reference for IEEE floating point:

http://www.appinf.com/download/FPIssues.pdf

I ported your sample to javascript and it does not produce the same result - there are no change at all.

http://jsfiddle.net/0u3hp7s5/

Advertisement

I ported your sample to javascript and it does not produce the same result - there are no change at all.

http://jsfiddle.net/0u3hp7s5/


That link is not working for me, but in JavaScript every number is a double, so you have considerably more precision.

I always write a*(1-t)+b*t because I want the expression to really evaluate to a at t=0 and to b at t=1. Worry about speed only if your profiler tells you this is a bottleneck. [Guess: it probably isn't.]

This topic is closed to new replies.

Advertisement