Originally Posted By: LawnmowerMan
You are now smart or what?

Not just now! I was also smart 5 minutes ago. At least, I like to pretend I'm smart, truth be told, if I remember how to add up two numbers correctly without using a calculator, it's been a successful day for me.

I hate "please google shit for me" requests though, because that is what you are asking. You are asking us to google for you how to interpolate between numbers, but you didn't even give any information about what kind of acceleration curve you want or anything. So I rolled a dice for you and picked one for you. Behold, math:

Code:
result = _startValue + (-_difference / 2.0 * (cos(pi * time / _duration) - 1.0));



It's pesudo code (actually it's C++ and taken out of Rayne, but it might as well be pseudocode for Lite-C). _startValue, result and _difference are VECTOR. _difference is the difference between start and end, time is the delta into the animation and _duration is the duration of the animation.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com