operator unary- method

Rational operator unary-()

Negates this Rational.

-const Rational(2, 3) == const Rational(-2, 3)
-const Rational(-4, 5) == const Rational(4, 5)

Implementation

Rational operator -() => Rational(-_numerator, _denominator);