Constructs a complex number given its absolute value and argument.
The modulus
The argument
The complex number with the given modulus and argument.
import std.math; auto z = fromPolar(std.math.sqrt(2.0), PI_4); assert(approxEqual(z.re, 1.0L, real.epsilon)); assert(approxEqual(z.im, 1.0L, real.epsilon));
See Implementation
Constructs a complex number given its absolute value and argument.