std::complex::operators
复::操作符+=,-=,%2A=,/=
complex | (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。