在线文档教程
C++
数字 | Numerics

std::complex::operators

复::操作符+=,-=,%2A=,/=

complex& 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)

© cppreference.com

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

http://en.cpPreference.com/w/cpp/数值/复杂/运算符[医]阿瑞斯