operator / method

Fraction operator /(
  1. Fraction other
)

Division between two fractions.

Implementation

Fraction operator /(Fraction other) {
  return Fraction(
    numerator * other.denominator,
    denominator * other.numerator,
  );
}