Skip to main content

ATan2 (arctangent)

ATan2 Function

Calculates the arctangent, or inverse tangent, of the specified x- and y-coordinates. The arctangent is the angle from the x-axis to a line containing the origin (0, 0) and a point with coordinates (x_num, y_num). The angle is given in radians between -pi and pi, excluding -pi.

Syntax

ATan2(scalar X, scalar Y)

Arguments

ArgumentDescription
scalar XX-coordinate for which the arctangent is to be calculated
scalar YY-coordinate for which the arctangent is to be calculated

Examples:

ATan2(0,5)

Returns the value in radians of Arc tangent of specified X- coordinate and Y- coordinate.