operator - method

Complex operator -(
  1. Object other
)

Subtraction

Implementation

Complex operator -(Object other) {
  if (other is Complex) {
    return Complex(real - other.real, imaginary - other.imaginary);
  } else if (other is num) {
    return Complex(real - other, imaginary);
  }
  throw ArgumentError('Cannot subtract ${other.runtimeType} from Complex');
}