clamp method
Clamps the rational to be in the range lowerLimit-upperLimit. The
comparison is done using compareTo and therefore takes -0.0 into
account.
Implementation
Rational clamp(Rational lowerLimit, Rational upperLimit) =>
this < lowerLimit ? lowerLimit : this > upperLimit ? upperLimit : this;