Espacios de nombres
Variantes
Acciones

std::complex::operator+=,-=,*=,/=

De cppreference.com
< cpp‎ | numeric‎ | complex
 
 
 
std::complex
Funciones miembro
complex::operator+=complex::operator-=complex::operator*=complex::operator/=
Funciones no miembro
Funciones exponenciales
Funciones de potencias
Funciones trigonométricas
(C++11)
(C++11)
(C++11)
Funciones hiperbólicas
(C++11)
(C++11)
(C++11)
 
Plantilla primaria complex<T>
(1)
complex& operator+=(const T& other);
(hasta C++20)
constexpr complex& operator+=(const T& other);
(desde C++20)
(2)
complex& operator-=(const T& other);
(hasta C++20)
constexpr complex& operator-=(const T& other);
(desde C++20)
(3)
complex& operator*=(const T& other);
(hasta C++20)
constexpr complex& operator*=(const T& other);
(desde C++20)
(4)
complex& operator/=(const T& other);
(hasta C++20)
constexpr complex& operator/=(const T& other);
(desde C++20)
Especialización complex<float>
(1)
complex& operator+=(float other);
(hasta C++20)
constexpr complex& operator+=(float other);
(desde C++20)
(2)
complex& operator-=(float other);
(hasta C++20)
constexpr complex& operator-=(float other);
(desde C++20)
(3)
complex& operator*=(float other);
(hasta C++20)
constexpr complex& operator*=(float other);
(desde C++20)
(4)
complex& operator/=(float other);
(hasta C++20)
constexpr complex& operator/=(float other);
(desde C++20)
Especialización complex<double>
(1)
complex& operator+=(double other);
(hasta C++20)
constexpr complex& operator+=(double other);
(desde C++20)
(2)
complex& operator-=(double other);
(hasta C++20)
constexpr complex& operator-=(double other);
(desde C++20)
(3)
complex& operator*=(double other);
(hasta C++20)
constexpr complex& operator*=(double other);
(desde C++20)
(4)
complex& operator/=(double other);
(hasta C++20)
constexpr complex& operator/=(double other);
(desde C++20)
Especialización complex<long double>
(1)
complex& operator+=(long double other);
(hasta C++20)
constexpr complex& operator+=(long double other);
(desde C++20)
(2)
complex& operator-=(long double other);
(hasta C++20)
constexpr complex& operator-=(long double other);
(desde C++20)
(3)
complex& operator*=(long double other);
(hasta C++20)
constexpr complex& operator*=(long double other);
(desde C++20)
(4)
complex& operator/=(long double other);
(hasta C++20)
constexpr complex& operator/=(long double other);
(desde C++20)
Todas las especializaciones
(5)
template<class X>
complex& operator+=(const std::complex<X>& other);
(hasta C++20)
template<class X>
constexpr complex& operator+=(const std::complex<X>& other);
(desde C++20)
(6)
template<class X>
complex& operator-=(const std::complex<X>& other);
(hasta C++20)
template<class X>
constexpr complex& operator-=(const std::complex<X>& other);
(desde C++20)
(7)
template<class X>
complex& operator*=(const std::complex<X>& other);
(hasta C++20)
template<class X>
constexpr complex& operator*=(const std::complex<X>& other);
(desde C++20)
(8)
template<class X>
complex& operator/=(const std::complex<X>& other);
(hasta C++20)
template<class X>
constexpr complex& operator/=(const std::complex<X>& other);
(desde C++20)

Implementa los operadores de asignación compuestos para aritmética compleja y para aritmética escalar/compleja mixta. Los argumentos escalares se tratan como números complejos con la parte real igual al argumento y la parte imaginaria igual a cero.

1,5) Agrega other a *this.
2,6) Substrae other de *this.
3,7) Multiplica *this por other.
4,8) Divide *this entre other.

[editar] Parámetros

other - Un número complejo o un valor escalar de tipo coincidente (float, double, long double).

[editar] Valor de retorno

*this

[editar] Véase también

Aplica operadores unarios a números complejos.
(plantilla de función) [editar]
Realiza la aritmética de números complejos en dos valores complejos o un complejo y un escalar.
(plantilla de función) [editar]