std::complex::real

std::complex::real

primary template complex<T>
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)

Accesses the real part of the complex number.

1) Returns the real part.
2) Sets the real part to value.

Parameters

value - the value to set the real part to

Return value

1) The real part.
2) (none)

See also

returns the real component
(function template)
accesses the imaginary part of the complex number
(public member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/complex/real

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部