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

std::complex::imag

primary template complex<T>

?

?

T imag() const;

(1)

(until C++14)

constexpr T imag() const;

(1)

(since C++14)

void imag( T value );

(2)

?

specialization complex<float>

?

?

float imag() const;

(1)

(until C++11)

constexpr float imag();

(1)

(since C++11) (until C++14)

constexpr float imag() const;

(1)

(since C++14)

void imag( float value );

(2)

?

specialization complex<double>

?

?

double imag() const;

(1)

(until C++11)

constexpr double imag();

(1)

(since C++11) (until C++14)

constexpr double imag() const;

(1)

(since C++14)

void imag( double value );

(2)

?

specialization complex<long double>

?

?

long double imag() const;

(1)

(until C++11)

constexpr long double imag();

(1)

(since C++11) (until C++14)

constexpr long double imag() const;

(1)

(since C++14)

void imag( long double value );

(2)

?

访问复数的虚部。

1%29返回虚部。

2%29设置虚部value...

参数

value

-

the value to set the imaginary part to

另见

imag

returns the imaginary component (function template)

real

accesses the real part of the complex number (public member function)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com