operator + method

Fraction operator +(
  1. Fraction other
)

The sum between two fractions.

Implementation

Fraction operator +(Fraction other) => Fraction(
      numerator * other.denominator + denominator * other.numerator,
      denominator * other.denominator,
    );