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

std::real(std::complex)

Defined in header <complex>

?

?

template< class T > T real( const complex<T>& z );

(1)

(until C++14)

template< class T > constexpr T real( const complex<T>& z );

(1)

(since C++14)

long double real( long double z );

(2)

(since C++11)

template< class DoubleOrInteger > double real( DoubleOrInteger z );

(3)

(since C++11)

float real( float z );

(4)

(since C++11)

返回复数的真实分量。z,即.z.real()...

额外超载float,,,double,,,long double,以及所有整数类型,它们被视为零虚分量的复数。%28自C++11%29。

参数

z

-

complex value

返回值

真正的成分z...

另见

real

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

imag

returns the imaginary component (function template)

C.CREAL文件

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com