operator * method

Rational operator *(
  1. Rational other
)

Multiplication operator.

Implementation

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