std.complex
Module that will replace the built-in types cfloat, cdouble, creal, ifloat, idouble, and ireal. License:Boost License 1.0. Authors:
Andrei Alexandrescu Copyright Andrei Alexandrescu 2008 - 2009. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at ) http:
//www.boost.org/LICENSE_1_0.txt
- Representation choices for the Complex type. Cartesian representation is better when using additive operations and when real and imaginary part are to be manipulated separately. Polar representation is more advantageous when using multiplicative operations and when modulus and angle are to be manipulated separately.
- Complex type parameterized with the numeric type (e.g. float, double, or real) and the representation.
- Gets the real component of the number. Might involve a calculation, subject to representation. Use x.re to statically enforce Cartesian representation.
- Gets the imaginary component of the number. Might involve a calculation, subject to representation. Use x.im to statically enforce Cartesian representation.
- Gets the modulus of the number. Might involve a calculation, subject to representation. Use x.modulus to statically enforce polar representation.
- Gets the angle of the number. Might involve a calculation, subject to representation. Use x.angle to statically enforce polar representation.