Easing along, one step at a time
BounceEase was annoying me alot. I was trying to figure out how it worked, but I'm not very good with math and algorithm-thinking.
The original code looked like this:
And trying to figure out all the magic numbers, I eventually broke it down to this:
I never figured out how the '7.5625f' value was calculated, but the others are resolved.
Unfortunately, changing the value of 'bounciness' or 'bounces' produces poor results (probably from the constant!), so I didn't bother including the code with the rest of the equations.
Links that were useful in understanding and converting the equations:
http://www.robertpenner.com/easing/ (The guy who made most of these now-common equations)
http://sol.gfxile.net/interpolation/index.html (also has good descriptions and explanations)
Some nice graphs: