Math.atan2

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

Syntax

atan2(y, x)

Parameters

Return value

The angle in radians.