std::imag(std::complex) (3) - Linux Manuals
std::imag(std::complex): std::imag(std::complex)
NAME
std::imag(std::complex) - std::imag(std::complex)
Synopsis
Defined in header <complex>
template< class T > (until C++14)
T imag( const std::complex<T>& z );
template< class T > (since C++14)
constexpr T imag( const std::complex<T>& z );
float imag( float z );
template< class DoubleOrInteger > (1) (since C++11)
double imag( DoubleOrInteger z ); (until C++14)
long double imag( long double z ); (2)
constexpr float imag( float z );
template< class DoubleOrInteger > (since C++14)
constexpr double imag( DoubleOrInteger z );
constexpr long double imag( long double z );
1) Returns the imaginary component of the complex number z, i.e. z.imag().
2) Additional overloads are provided for float, double, long double, and all integer types, which are treated as complex numbers with zero imaginary component. (since C++11)
Parameters
z - complex value
Return value
the imaginary component of z
See also
imag (public member function)
real (function template)