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) |
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

