首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

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)

?

访问复数的真实部分。

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)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com