I'm working on a game which relies on "flinging" an object. That is, click and hold on the object, and then drag and release it, and it continues on the path you were dragging it. Of course, the most well-known example of flinging is with iPhone and Android devices, where you can quickly scroll down a list by quickly swiping your finger upward, giving the illusion of "flinging" the list.
I'm tracking mouse positions (x,y) and timestamps. But I'm drawing a blank as to how I can take a list of positions and times and get out of it a velocity or curve that an object should follow.
What are my options? Right now I am looking only for a straight-line fling action, but if it's easy to implement some sort of curve that better fits the fling, that would be good information that I might be able to integrate into the design of the game.