abs

fnT abs(T)(Complex!T z) @safe pure nothrow @nogc

Calculates the absolute value (or modulus) of a complex number.

normal case
z abs(z) Notes
(0, 0) 0
(NaN, any) or (any, NaN) NaN
(Inf, any) or (any, Inf) Inf
(a, b)hypot(a, b) Uses algorithm to prevent overflow/underflow

Parameters

zA complex number of type Complex!T

Returns

The absolute value (modulus) of z