operator / method Null safety

Complex operator /(
  1. Complex other
)

Implementation

Complex operator /(Complex other) {
  final mag = other.real * other.real + other.imaginary * other.imaginary;
  return Complex((real * other.real + imaginary * other.imaginary) / mag,
      (imaginary * other.real - real * other.imaginary) / mag);
}