Namensräume
Varianten
Aktionen

std::complex<T>::operator+=,-=,*=,/=

Von cppreference.com
< cpp‎ | numeric‎ | complex
 
 
 
 
Primäre Vorlage complex<T>
(1)
complex& operator+=( const T& other );
(bis C++20)
constexpr complex& operator+=( const T& other );
(seit C++20)
(2)
complex& operator-=( const T& other );
(bis C++20)
constexpr complex& operator-=( const T& other );
(seit C++20)
(3)
complex& operator*=( const T& other );
(bis C++20)
constexpr complex& operator*=( const T& other );
(seit C++20)
(4)
complex& operator/=( const T& other );
(bis C++20)
constexpr complex& operator/=( const T& other );
(seit C++20)
Spezialisierung complex<float>
(1)
complex& operator+=( float other );
(bis C++20)
constexpr complex& operator+=( float other );
(seit C++20)
(2)
complex& operator-=( float other );
(bis C++20)
constexpr complex& operator-=( float other );
(seit C++20)
(3)
complex& operator*=( float other );
(bis C++20)
constexpr complex& operator*=( float other );
(seit C++20)
(4)
complex& operator/=( float other );
(bis C++20)
constexpr complex& operator/=( float other );
(seit C++20)
Spezialisierung complex<double>
(1)
complex& operator+=( double other );
(bis C++20)
constexpr complex& operator+=( double other );
(seit C++20)
(2)
complex& operator-=( double other );
(bis C++20)
constexpr complex& operator-=( double other );
(seit C++20)
(3)
complex& operator*=( double other );
(bis C++20)
constexpr complex& operator*=( double other );
(seit C++20)
(4)
complex& operator/=( double other );
(bis C++20)
constexpr complex& operator/=( double other );
(seit C++20)
Spezialisierung complex<long double>
(1)
complex& operator+=( long double other );
(bis C++20)
constexpr complex& operator+=( long double other );
(seit C++20)
(2)
complex& operator-=( long double other );
(bis C++20)
constexpr complex& operator-=( long double other );
(seit C++20)
(3)
complex& operator*=( long double other );
(bis C++20)
constexpr complex& operator*=( long double other );
(seit C++20)
(4)
complex& operator/=( long double other );
(bis C++20)
constexpr complex& operator/=( long double other );
(seit C++20)
Alle Spezialisierungen
(5)
template<class X>
complex& operator+=( const std::complex<X>& other );
(bis C++20)
template<class X>
constexpr complex& operator+=( const std::complex<X>& other );
(seit C++20)
(6)
template<class X>
complex& operator-=( const std::complex<X>& other );
(bis C++20)
template<class X>
constexpr complex& operator-=( const std::complex<X>& other );
(seit C++20)
(7)
template<class X>
complex& operator*=( const std::complex<X>& other );
(bis C++20)
template<class X>
constexpr complex& operator*=( const std::complex<X>& other );
(seit C++20)
(8)
template<class X>
complex& operator/=( const std::complex<X>& other );
(bis C++20)
template<class X>
constexpr complex& operator/=( const std::complex<X>& other );
(seit C++20)

Implementiert die zusammengesetzten Zuweisungsoperatoren für die komplexe Arithmetik und für gemischte komplexe/skalare Arithmetik. Skalarargumente werden als komplexe Zahlen behandelt, deren Realteil gleich dem Argument und deren Imaginärteil auf Null gesetzt ist.

1,5) Addiert other zu *this.
2,6) Subtrahiert other von *this.
3,7) Multipliziert *this mit other.
4,8) Dividiert *this durch other.

[edit] Parameter

Sonstiges - Ein komplexer oder skalarer Wert vom passenden Typ (float, double, long double)

[edit] Rückgabewert

*this

[edit] Siehe auch

wendet unäre Operatoren auf komplexe Zahlen an
(function template) [edit]
führt arithmetische Operationen mit komplexen Zahlen auf zwei komplexen Werten oder einer komplexen Zahl und einem Skalar durch
(function template) [edit]