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

std::complex::operators

complex<T>& operator+=( const T& other );

(1)

?

template< class X > complex<T>& operator+=( const complex<X>& other );

(2)

?

complex<T>& operator-=( const T& other );

(3)

?

template< class X > complex<T>& operator-=( const complex<X>& other );

(4)

?

complex<T>& operator*=( const T& other );

(5)

?

template< class X > complex<T>& operator*=( const complex<X>& other );

(6)

?

complex<T>& operator/=( const T& other );

(7)

?

template< class X > complex<T>& operator/=( const complex<X>& other );

(8)

?

实现了复算法和混合复/标量算法的复合赋值算子。标量参数被视为复数,实数等于实数,虚部设为零。

1-2%29other*this...

3-4%29减other*this...

5-6%29乘*this通过other...

7-8%分29*this通过other...

参数

other

-

a complex or scalar value of matching type (float, double, long double)

返回值

*this...

另见

operator+operator-

applies unary operators to complex numbers (function template)

operator+operator-operator*operator/

performs complex number arithmetics on two complex values or a complex and a scalar (function template)

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

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com