simple property

Rational get simple

The simplified version of this Rational.

Implementation

Rational get simple {
  final divisor = _numerator.gcd(_denominator);

  return Rational(
    _denominator.nonZeroSign * (_numerator ~/ divisor),
    _denominator.abs() ~/ divisor,
  );
}