#### Archived

This topic is now archived and is closed to further replies.

# Vector to degrees

This topic is 5992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi! I''ve got a (hopefully) simple question: How can I convert a unified 2D Vector into a single degree-value? e.g. (just estimated) 0,1 -> 0 1,1 -> 45 1,0 -> 90 1,-1 -> 135 0,-1 -> 180 ...... Do you have any ideas? Thanks!!!!!!!!!!!!!!!!!

inverse tan

##### Share on other sites
use arctan(), which converts x/y values into degrees. This should be standard in your compiler''s math library.

------------------------------------------------
The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.

-Six String Samurai

##### Share on other sites
This might also help:

if v is your vector and & the angle from initial position

sin& = y/|v|
and
cos& = x/|v|

since your vector is a unit

sin& = y
cos& = x

Usually, however, there are ways to avoid trig if you are using vectors.

##### Share on other sites
Whats the application ?
If you say what it is for, maybe we can help you avoid trig altogether.

1. 1
Rutin
67
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• ### Forum Statistics

• Total Topics
633416
• Total Posts
3011780
• ### Who's Online (See full list)

There are no registered users currently online

×