Namespaces
Variants
Views
Actions

std::imag(std::complex)

From cppreference.com
< cpp‎ | numeric‎ | complex
Revision as of 21:27, 23 April 2013 by Dieram3 (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <complex>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
template< class T >
T imag( const complex<T>& z );
</td>

<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">

<td >
long double imag( long double z );
</td>

<td > (2) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
template< class DoubleOrIngeter >
double imag( DoubleOrInteger z );
</td>

<td > (3) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
float imag( float z );
</td>

<td > (4) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

Returns the imaginary component of the complex number z, i.e. z.imag().

(since C++11)Additional overloads are provided for float, double, long double, and all integer types, which are treated as complex numbers with zero imaginary component.

Parameters

z - complex value

Return value

the imaginary component of z

See also

Template:cpp/numeric/complex/dcl list realTemplate:cpp/numeric/complex/dcl list imagTemplate:cpp/numeric/complex/dcl list imag2