operator * method
Returns the multiplication of this complex value and other
.
Implementation
Complex operator *(Object other) {
if (other is Complex) {
return Complex(a * other.a - b * other.b, a * other.b + b * other.a);
} else if (other is num) {
return Complex(a * other, b * other);
} else {
throw ArgumentError.value(other, 'other', 'Invalid type');
}
}