std.complex
Module that will replace the built-in types cfloat, cdouble, creal, ifloat, idouble, and ireal. Authors:Lars Tandle Kyllingstad License:
Boost License 1.0 Source:
std/complex.d
- A complex number parametrised by a type T.
- The real part of the number.
- The imaginary part of the number.
- Calculate the absolute value (or modulus) of the number.
- Calculate the argument (or phase) of the number.
- Return the complex conjugate of the number.
- Convert the complex number to a string representation. If a sink delegate is specified, the string is passed to it and this function returns null. Otherwise, this function returns the string representation directly. The output format is controlled via formatSpec, which should consist of a single POSIX format specifier, including the percent (%) character. Note that complex numbers are floating point numbers, so the only valid format characters are 'e', 'f', 'g', 'a', and 's', where 's' gives the default behaviour. Positional parameters are not valid in this context. See the std.format documentation for more information.
- Construct a complex number given its absolute value and argument.