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