template< class T > complex<T> operator+( const complex<T>& val ); | (1) | |
template< class T > complex<T> operator-( const complex<T>& val ); | (2) |
Implements the analogs of the unary arithmetic operators for complex numbers.
val | - | the complex number argument |
complex<T>(val)
complex<T>(-val.real(), -val.imag())
performs complex number arithmetics on two complex values or a complex and a scalar (function template) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/complex/operator_arith2