|
-
Feb 5th, 2005, 06:17 AM
#3
Fanatic Member
Re: Angles
Alternatively, you know:
(5, -3) = r*(cos(theta), sin(theta)) where theta = 90 - bearing
- think 5 - 3i = r cis(theta)
also, r = length = sqrt(34)
so, really:
(5, -3) = (r sin(bearing), r cos(bearing))
=> tan(bearing) = 5 / -3
now, there are two options, one of which is obviously true, one of which is 180 degrees out.
(BTW, if it's in C++, you can use bearing = atan2(5, -3))
sql_lall 
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
|