Calculate direction angle from two vectors?

Posted by james.ingham on Stack Overflow See other posts from Stack Overflow or by james.ingham
Published on 2010-04-03T11:51:32Z Indexed on 2010/04/03 16:13 UTC
Read the original article Hit count: 315

Filed under:
|
|

Hi,

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 direction of travel?

This image might help understand what I'm after:

alt text

Thanks

-James

© Stack Overflow or respective owner

Related posts about vectors

Related posts about angle