getY

constexpr double getY() const noexcept

Gets the imaginary component y.

Returns

double

A imaginary number.

Gets the imaginary component of the complex object.

Example

Complex z(1, 4);
std::cout << z.getY() << "\n";

Output:

4