Hi everyone! I am currently doing my final year project. I have some doubts understanding the angle system for atan2() formula. For normal 360 formula, 0 degree is the North, 90 is the East, 180 is the South, 270 is the West. But I did some research for atan2() formula, 90 degree is the North, 0 degree is the East, 270 is the South and 180 is the West. It is different from the normal 360 degree system. Can someone explain to me the reason why is this so? It will really help me a lot for my project. Thanks You!!
(deleted)
Surely a maths forum would be a better pace to ask ?
If you don't like negative numbers, add 360 to the negative ones.
Doesn't atan2() return a value in radians? +/- Pi
Also note that the arguments are (Y, X). If you put in (X,Y) your coordinate system will be rotated by Pi/2 (90°).
Can someone explain to me the reason why is this so?
atan2() knows nothing about North, East, etc.
It knows about the Y and X axes, and you decide which direction those axes should be pointing. A reasonable choice would by X pointing North and Y pointing East.
johnwasser:
Also note that the arguments are (Y, X). If you put in (X,Y) your coordinate system will be rotated by Pi/2 (90°).
Thanks for the advice! If I am using atan2(y, x), does the angle returned still follows the normal compass bearing? Or will the coordinate system be rotated by 90°? Thanks@
See reply #4. The only correct usage is atan2(y,x).
You still don't understand the difference between the two coordinate systems.
It'll be the standard geometry coordinate system which has the positive x axis to the right, and positive y axis is up (not down as in your diagram).
Pete
Okay thanks for the replies!