Calculate direction angle from two vectors?
问题 Say I have two 2D vectors, one for an objects current position and one for that objects previous position. How can I work out the angular direction of travel? This image might help understand what I'm after: (image) http://files.me.com/james.ingham/crcvmy 回答1: The direction vector of travel will be the difference of the two position vectors, d = (x1, y1) - (x, y) = (x1 - x, y1 - y) Now when you ask for the direction angle, that depends what direction you want to measure the angle against. Is