operator / method

  1. @override
Complex<num, num> operator /(
  1. Complex<num, num> other
)

Implementation

@override
Complex operator /(Complex other) {
  final denominator = math.pow(other.real, 2) + math.pow(other.imaginary, 2);
  final iTotal =
      (real * other.real + imaginary * other.imaginary) / denominator;
  final jTotal =
      (imaginary * other.real - real * other.imaginary) / denominator;
  return Complex(iTotal, jTotal);
}