Policies & Guidelines

ATAN2

Calculate angle

Description

Calculates the angle between the vertical x-axis, and a line drawn between the given x/y coordinates and the origin. The value is returned in radians.

Function signature

ATAN2(numberx: Number, numbery: Number) => Number

Parameter

Description

Number X

The x coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis

Number Y

The y coordinate of the endpoint of the line segment for which to calculate the angle from the x-axis.

Examples

Formula

Return value

ATAN2(0.9, 0.7)

0.66104317

ATAN2(1, -9)

-1.46013911

ATAN2(0.5, 0)

0