The OpenD Programming Language

atan

Inverse trigonometric functions on complex numbers.

@safe pure nothrow @nogc
atan
(
T
)

Return Value

Type: Complex!T

The arcsine, arccosine and arctangent of z, respectively.

Examples

import std.math.operations : isClose;
import std.math.constants : PI;
assert(atan(complex(0.0)) == 0.0);
assert(isClose(atan(sqrt(complex(3.0L))), PI / 3));
assert(isClose(atan(sqrt(complex(3.0f))), float(PI) / 3));
import std.math.operations : isClose;
import std.math.constants : PI;
assert(asin(complex(0.0)) == 0.0);
assert(isClose(asin(complex(0.5L)), PI / 6, 0, 1e-15));
import std.math.operations : isClose;
import std.math.constants : PI;
import std.math.trigonometry : std_math_acos = acos;
assert(acos(complex(0.0)) == std_math_acos(0.0));
assert(isClose(acos(complex(0.5L)), PI / 3, 0, 1e-15));

Meta