std::real(std::complex)
From cppreference.com
Defined in header <complex>
|
||
(1) | ||
template< class T > T real( const std::complex<T>& z ); |
(until C++14) | |
template< class T > constexpr T real( const std::complex<T>& z ); |
(since C++14) | |
(2) | ||
float real( float z ); template< class DoubleOrInteger > |
(since C++11) (until C++14) |
|
constexpr float real( float z ); template< class DoubleOrInteger > |
(since C++14) | |
1) Returns the real part of the complex number z, i.e. z.real().
2) Additional overloads are provided for float, double, long double, and all integer types, which are treated as complex numbers with zero imaginary part.
|
(since C++11) |
[edit] Parameters
z | - | complex value |
[edit] Return value
The real part of z.
[edit] See also
accesses the real part of the complex number (public member function) | |
returns the imaginary part (function template) | |
C documentation for creal
|