atan2
fn
real atan2(real y, real x) @trusted pure nothrow @nogcCalculates the arc tangent of y / x, returning a value ranging from -π to π.
| y | x | atan(y, x) |
|---|---|---|
| NaN | anything | NaN |
| anything | NaN | NaN |
| ±0.0 | ≥0.0 | ±0.0 |
| ±0.0 | +0.0 | ±0.0 |
| ±0.0 | <0.0 | ±π |
| ±0.0 | -0.0 | ±π |
| ≥0.0 | ±0.0 | π/2 |
| <0.0 | ±0.0 | -π/2 |
| ≥0.0 | ∞ | ±0.0 |
| ±∞ | anything | ±π/2 |
| ≥0.0 | -∞ | ±π |
| ±∞ | ∞ | ±π/4 |
| ±∞ | -∞ | ±3π/4 |
fn
double atan2(double y, double x) @safe pure nothrow @nogcditto
fn
float atan2(float y, float x) @safe pure nothrow @nogcditto