Hmm well it could be 3 things:
1) The arctan you are using returns the angle in degrees. Try it without the 180/pi factor.
2) You are not using arctan but 1/tan. At least the way you wrote it suggests this.
tan^-1 (x) != [tan(x)]^-1
This is why generally the notation arctan(x) or atan(x) is preferred over tan^-1 (x).
3) A definition problem.
The angle you will get from the inverse tan is the following:
Code: Select all
y
^ (x,y)
| /
| /
| /
| /
|/ ) a
0------------->x
Given the point (x,y) then:
a = atan(y/x); when x > 0
a = atan(y/x) + pi; when x < 0
a = pi/2; when x = 0 and y > 0
a = -pi/2; when x = 0 and y < 0
a is undefined; when x = 0 and y = 0
However, in computer graphics, the y axis of a screen is often oriented down instead of up, so you will get the angle the other way around.
<<< Sorry for offtopic

>>>
Ah very cool TopTiger

.. I'm in Delft currently doing Aerospace Engineering.. Not a bad idea to go here after your HBO.. I believe you can already start your MSc programme after only a 1 year transfer programme, so that's pretty sweet

.. only problem is they like concrete so much the CE building looks like a forgotten nazi bunker
