Atom

math.atan2()

Computes the angle of a vector using both coordinates.

Signature

math.atan2(y, x)

Parameters

Numeric y followed by numeric x.

Returns

f64 radians.

Behavior

Retains quadrant information.

Errors

Requires two numbers.

Example

Atom
use math
assert(math.atan2(0, 1) == 0)