Skip to content

format

typescript
Mathf.ATan2(y, x)

class: Mathf

description

Returns the angle (in radians) from the X-axis to a point.

parameter

param_nametypedescription
ynumberThe value of the y-coordinate in Cartesian coordinates.
xnumberThe value of the x-coordinate in Cartesian coordinates.

return

typedescription
numberThe angle (in radians) from the X-axis to the point.

code example