Get rotation from a vector?
BlitzMax Forums/BlitzMax Programming/Get rotation from a vector?| 
 | ||
| Hi, let's say I've got an image and a vector ([0.4,0.6] for example) that i'm moving the image along. How can I get the angle that the image needs to be rotated to point in the vectors direction? Must be something with sinus and cosinus but I can't figure out the correct formula. Maybe you can help me? | 
| 
 | ||
| atan(.6/.4) will return the angle for the above example. | 
| 
 | ||
| Ang=Atan2(x,y) | 
| 
 | ||
|  Ang=Atan2(x,y) y,x. | 
| 
 | ||
|  y,x  | 
| 
 | ||
| Thanks all! Didn't even know about this command. |