atan2()
Returns the arc tangent of the Cartesian coordinates y and x.
Synopsis
float atan2( float y, float x);
Parameters
Parameter | Description |
---|---|
y | Y-coordinate |
x | X-coordinate |
Return Value
Arc tangent of Cartesian coordinates.
Description
Returns the arc tangent of the Cartesian coordinates y and x.
Example
main()
{
double pi=3.1415926,x,y,res;
x = 0;
y = 10;
res = atan2(y,x)*180 / pi;
DebugN("The atan for the values " + y + " and " + x + " is " + res);
//["The atan for the values 10 and 0 is 90.000001535235"]
}
Assignment
Mathematical function
Availability
CTRL