atan

Calculates the arc tangent of x, returning a value ranging from -π/2 to π/2.

Special Values
xatan(x)invalid?
±0.0±0.0no
±∞NaNyes
  1. real atan(real x)
    pragma(inline, true) @safe pure nothrow @nogc
    real
    atan
    (
    real x
    )
  2. double atan(double x)
  3. float atan(float x)

Examples

import std.math.operations : isClose;
import std.math.traits : isIdentical;
import std.math.constants : PI;
import std.math.algebraic : sqrt;

assert(isIdentical(atan(0.0), 0.0));
assert(atan(sqrt(3.0)).isClose(PI / 3));

Meta