atan2

fnreal atan2(real y, real x) @trusted pure nothrow @nogc

Calculates 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
fndouble atan2(double y, double x) @safe pure nothrow @nogc

ditto

fnfloat atan2(float y, float x) @safe pure nothrow @nogc

ditto