Atan2

atan2

Description:
Function atan2 calculates the arctangent from the coordinates of a point.
Parameters and mixed up in places. If you call a function with parameters and (i.e., ), the function will return the arctangent from the point. x y 0.0 1.0 atan2(0.0, 1.0)(1.0, 0.0)


Parameters:
(Float:X, Float:Y)
float X The X-coordinate of the point at which you want to find the arctangent.
float Y The Y-coordinate of the point at which you want to find the arctangent.

}


Return Values:
Arctangent from a point (the angle between the positive part of the x-axis and the straight line drawn from), in degrees. (x, y)(0, 0)(x, y)


Examples:
main()
{
	atan2(0.0, 1.0) = pi / 2 = 90°
	new Float: result = atan2(1.0, 0.0); // parameters are mixed up (see note above)
	printf("%.4f", result); // Conclusion: 89.9999
}


Related Functions
The following functions may be useful, as they are related to this function in one way or another.
  • asin: Calculates arksinus from the specified value.
  • acos: Calculates the arccosine from the specified value.
  • atan: Calculates the arctangent of the specified value.
  • floatsin: Calculates the sine of an angle.
  • floatcos: Calculates the cosine of the angle.
  • floattan: Calculates the tangent of an angle.


Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.