Namespaces
Variants
Views
Actions

std::complex::complex

From cppreference.com
< cpp‎ | numeric‎ | complex
Revision as of 22:15, 31 May 2013 by P12bot (Talk | contribs)

constexpr complex( const T& re = T(), const T& im = T() );
(1)
constexpr complex( const complex& other );
(2)

Constructs the std::complex object.

1) Constructs the complex number from real and imaginary parts.

2) Copy constructor. Constructs the object with the copy of the contents of other.

Parameters

re - the real part
im - the imaginary part
other - another complex to use as source

Notes

Constructors are marked as constexpr since c++14

See also

assigns the contents
(public member function) [edit]