std::complex::operators (unary)

1
2
template< class T >
complex<T> operator+( const complex<T>& val );
(1)
1
2
template< class T >
complex<T> operator-( const complex<T>& val );
(2)

Implements the analogs of the unary arithmetic operators for complex numbers.

1) Returns the value of its argument
2) Negates the argument

Parameters

val - the complex number argument

Return value

1) a copy of the argument, complex<T>(val)
2) negated argument, complex<T>(-val.real(), -val.imag())

See also

performs complex number arithmetics on two complex values or a complex and a scalar
(function template)
doc_CPP
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.