operator * method
- Complex other
Multiplies two complex numbers using the standard complex multiplication rule.
Returns (ac - bd) + (ad + bc)i where this = a + bi and other = c + di.
Implementation
Complex operator *(Complex other) {
return Complex(
_real * other._real - _imag * other._imag,
_real * other._imag + _imag * other._real,
);
}