I'm kind of embarrassed I can't figure this out on my own... It's to be used to determine the movement of objects in a game (2d space). This is quite obviously something that has been solved many times over, but I haven't had any luck searching for an answer, so I thought I'd try here!
Homework...