public member function
<complex>
std::complex::real get (1)T real() const;set (2)
void real (T val);
Real part
Returns the real part of the complex number.
Returns the real part of the complex number (1), or sets val as the new value for the real part (2).
T
is complex's template parameter.
1
2
3
4
5
6
7
8
9
10
11
12
// complex::real example
#include <iostream> // std::cout
#include <complex> // std::complex
int main ()
{
std::complex<double> mycomplex (10.0,1.0);
std::cout << "Real part: " << mycomplex.real() << '\n';
return 0;
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4