primary template complex<T> | ||
(1) | ||
T imag() const; | (until C++14) | |
constexpr T imag() const; | (since C++14) | |
(2) | ||
void imag( T value ); | (until C++20) | |
constexpr void imag( T value ); | (since C++20) | |
specialization complex<float> | ||
(1) | ||
float imag() const; | (until C++11) | |
constexpr float imag(); | (since C++11) (until C++14) | |
constexpr float imag() const; | (since C++14) | |
(2) | ||
void imag( float value ); | (until C++20) | |
constexpr void imag( float value ); | (since C++20) | |
specialization complex<double> | ||
(1) | ||
double imag() const; | (until C++11) | |
constexpr double imag(); | (since C++11) (until C++14) | |
constexpr double imag() const; | (since C++14) | |
(2) | ||
void imag( double value ); | (until C++20) | |
constexpr void imag( double value ); | (since C++20) | |
specialization complex<long double> | ||
(1) | ||
long double imag() const; | (until C++11) | |
constexpr long double imag(); | (since C++11) (until C++14) | |
constexpr long double imag() const; | (since C++14) | |
(2) | ||
void imag( long double value ); | (until C++20) | |
constexpr void imag( long double value ); | (since C++20) |
Accesses the imaginary part of the complex number.
value
.value | - | the value to set the imaginary part to |
returns the imaginary component (function template) |
|
accesses the real part of the complex number (public member function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/complex/imag