complex<T>& operator=( const T& x ); | (1) | |
template< class X > complex<T>& operator=( const complex<X>& cx ); | (2) |
Assigns new values to the contents.
x
to the real part of the complex number. Imaginary part is set to zero.cx.real()
and cx.imag()
to the real and the imaginary parts of the complex number respectively.x | - | value to assign |
cx | - | complex value to assign |
*this
.
constructs a complex number (public member function) |
|
A std::complex literal representing pure imaginary number (function) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/numeric/complex/operator=