description

# atan2 function

double atan2(

1. num a,
2. num b

)

A variant of atan.

Converts both arguments to doubles.

Returns the angle in radians between the positive x-axis and the vector (`b`,`a`). The result is in the range -PI..PI.

If `b` is positive, this is the same as `atan(a/b)`.

The result is negative when `a` is negative (including when `a` is the double -0.0).

If `a` is equal to zero, the vector (`b`,`a`) is considered parallel to the x-axis, even if `b` is also equal to zero. The sign of `b` determines the direction of the vector along the x-axis.

Returns NaN if either argument is NaN.

## Implementation

    external double atan2(num a, num b);