std::real(std::complex)
From cppreference.com
Template:ddcl list begin <tr class="t-dsc-header">
<td>Defined in header
</td>
<complex>
<td></td> <td></td> </tr> <tr class="t-dcl ">
<td >template< class T >
T real( const complex<T>& z );
</td>
T real( const complex<T>& z );
<td > (1) </td> <td class="t-dcl-nopad"> </td> </tr> <tr class="t-dcl ">
<td >std::complex<long double> real( long double z );
</td>
<td > (2) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td >template< class DoubleOrIngeter >
std::complex<double> real( DoubleOrInteger z );
</td>
std::complex<double> real( DoubleOrInteger z );
<td > (3) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">
<td >std::complex<float> real( float z );
</td>
<td > (4) </td> <td > (since C++11) </td> </tr> Template:ddcl list end
Returns the real component of the complex number z
, i.e. z.real().
(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 real component of z