Complex numbers. More...
#include <complex.h>
Inherits array< T, 2 >.
Public Types | |
| using | base_type = array< T, 2 > |
Public Member Functions | |
| template<typename U > requires std::constructible_from<T, U> | |
| complex & | operator= (U &&r) |
| Specialized assignment operator. | |
Constructors | |
| template<typename U = T> requires std::constructible_from<T,U> | |
| constexpr | complex (const T &r=0, const U &i=0) |
| template<typename U > requires std::constructible_from<T,U> | |
| constexpr | complex (const array< U, 2 > &src) |
| template<typename U > requires std::constructible_from<T, U> | |
| constexpr | complex (const std::complex< U > &src) |
Conversion to std::complex (with optimal float or double type based on T) – not on 'U'! | |
| constexpr auto | std_complex (void) const -> decltype(std::complex(std::declval< T >(), std::declval< T >())) |
| template<typename U > | |
| static constexpr auto | std_complex (complex< U > u) -> decltype(std::complex(std::declval< T >(), std::declval< T >())) |
Addition | |
| constexpr complex | operator+ (T u) const |
| template<typename U > | |
| constexpr complex | operator+ (complex< U > u) const |
| template<typename U > | |
| constexpr complex & | operator+= (U u) |
| constexpr complex | operator+ (T u, complex &t) |
Subtraction | |
| constexpr complex | operator- (T u) const |
| template<typename U > | |
| constexpr complex | operator- (complex< U > u) const |
| template<typename U > | |
| constexpr complex & | operator-= (U u) |
| constexpr complex | operator- (T u, complex &t) |
Multiplication | |
| constexpr complex | operator* (T u) const |
| template<typename U > | |
| constexpr complex | operator* (complex< U > u) const |
| template<typename U > | |
| constexpr complex & | operator*= (U u) |
| constexpr complex | operator* (T u, complex &t) |
Division | |
| constexpr complex | operator/ (T u) const |
| template<typename U > | |
| constexpr complex | operator/ (complex< U > u) const |
| template<typename U > | |
| constexpr complex & | operator/= (U u) |
| constexpr complex | operator/ (T u, complex &t) |
Complex numbers.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
Specialized assignment operator.
|
inlinestaticconstexpr |
|
inlineconstexpr |