std::complex<T>::imag (3) - Linux Manuals

std::complex<T>::imag: std::complex<T>::imag

NAME

std::complex<T>::imag - std::complex<T>::imag

Synopsis


primary template complex<T>
T imag() const; (until C++14)
constexpr T imag() const; (since C++14)
void imag( T value ); (until C++20)
constexpr void imag( T value ); (since C++20)
specialization complex<float>
float imag() const; (until C++11)
constexpr float imag(); (since C++11)
                                                                              (until C++14)
constexpr float imag() const; (since C++14)
void imag( float value ); (until C++20)
constexpr void imag( float value ); (since C++20)
specialization complex<double>
double imag() const; (1) (until C++11)
constexpr double imag(); (2) (since C++11)
                                                  (1) (until C++14)
constexpr double imag() const; (since C++14)
void imag( double value ); (2) (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(); (2) (since C++11)
                                                                                                           (1) (until C++14)
constexpr long double imag() const; (since C++14)
void imag( long double value ); (2) (until C++20)
constexpr void imag( long double value ); (since C++20)


Accesses the imaginary part of the complex number.
1) Returns the imaginary part.
2) Sets the imaginary part to value.

Parameters


value - the value to set the imaginary part to

See also


     returns the imaginary component
imag (function template)
     accesses the real part of the complex number
real (public member function)