constructor
-
constexpr Complex() noexcept
-
constexpr Complex(const double x) noexcept
-
constexpr Complex(const double x, const double y) noexcept
-
constexpr Complex(const Complex &z) noexcept
-
template<class T>
constexpr Complex(const std::complex<T> &z) noexcept Instantiates an object for the
Complexclass.
Parameters
Initializes a Complex object with real and imaginary components. If unspecified by the user, the respective component will be set to \(0\).
Example
std::cout << Complex(5, 4) << "\n";
Output:
5 + 4j