std::complex::real
STD::复杂::真实
primary template complex | | |
---|---|---|
T real() const; | (1) | (until C++14) |
constexpr T real() const; | (1) | (since C++14) |
void real( T value | (2) | |
specialization complex<float> | | |
float real() const; | (1) | (until C++11) |
constexpr float real( | (1) | (since C++11) (until C++14) |
constexpr float real() const; | (1) | (since C++14) |
void real( float value | (2) | |
specialization complex<double> | | |
double real() const; | (1) | (until C++11) |
constexpr double real( | (1) | (since C++11) (until C++14) |
constexpr double real() const; | (1) | (since C++14) |
void real( double value | (2) | |
specialization complex<long double> | | |
long double real() const; | (1) | (until C++11) |
constexpr long double real( | (1) | (since C++11) (until C++14) |
constexpr long double real() const; | (1) | (since C++14) |
void real( long double value | (2) | |
访问复数的真实部分。
1%29返回真实的部分。
2%29设置真正的部分value
...
参数
value | - | the value to set the real part to |
---|
返回值
1%29是真正的部分。
2%29%280%29
另见
real | returns the real component (function template) |
---|---|
imag | accesses the imaginary part of the complex number (public member function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。