|
-
Apr 19th, 2001, 02:11 PM
#1
If i have a 2D direction vector, how can I get the facing in degrees? Thanks.
Z.
-
Apr 19th, 2001, 02:16 PM
#2
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Apr 19th, 2001, 02:19 PM
#3
tangent Theta = deltaY / deltaX
So, your vector may be in the form (Xstart,Ystart) to (Xend,Yend)
So
Theta = ArcTan ( (Yend-Ystart) / (Xend-Xstart) )
Watch your quadrant and radians/degrees
"atan2" can handle the the quadrant issue.
Degrees * PI / 180 = Radians
-
Apr 19th, 2001, 02:21 PM
#4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|