I'm creating an app and this app has gesture controlled animation. I'm working on a deceleration algorithm, but I'm having a little trouble with a calculation.
I have a timer served by an
interval (in seconds) and I have a
speed of gesture swipe. I'm having a little trouble getting the initial time
interval the first time the timer fires an event.
I somehow need to map
interval to begin deceleration.
At it's fastest,
4000 and when
4000 I wish to return an
0.000001 - the smallest time interval and therefore the timer will fire faster.
At it's slowest,
0 and when
0 I wish to return an
0.01 - the largest time interval and therefore the timer will fire slower.
Thanks for any help you may give me.