Constructs a complex number given its absolute value and argument.
The modulus
The argument
The complex number with the given modulus and argument.
import mir.math : approxEqual, PI, sqrt; auto z = fromPolar(sqrt(2.0), double(PI / 4)); assert(approxEqual(z.re, 1.0)); assert(approxEqual(z.im, 1.0));
See Implementation
Constructs a complex number given its absolute value and argument.