Answers for "Issue finding an angle with trigonometry"
http://answers.unity.com/questions/1559704/issue-finding-an-angle-with-trigonometry.html
The latest answers for the question "Issue finding an angle with trigonometry"Answer by Bunny83
http://answers.unity.com/answers/1559735/view.html
He does not take [the tangent][1] of x and y but he takes the "arctan" of "y/x". The special [atan2][2] method does the same but in addition it takes the quadrants into account and applies the proper 90° rotations to get a 360° result
<br>
The "tan" method takes an angle in radians and calulates the length of the tangent on the unit circle. The atan method does the reverse. You pass in the length of the tangent and it returns the angle. This only works properly for the first (main) quadrant of the coordinate system. Though since atan2 gets y and x seperately it can analyse the sign of x and y and apply the quadrant corrections. I'm not sure what else we can say here. It's just basic trigonometry. By dividing y by x we get the length of the tangent on the unit circle y / x == tan(a) / 1
[1]: https://en.wikipedia.org/wiki/Trigonometric_functions#tan
[2]: https://en.wikipedia.org/wiki/Atan2Thu, 04 Oct 2018 22:27:22 GMTBunny83