operator + method

Complex operator +(
  1. Complex other
)

Calculates the sum between two complex numbers.

Implementation

Complex operator +(Complex other) {
  return Complex(
    real + other.real,
    imaginary + other.imaginary,
  );
}