RationalToleranceExtension extension
Extension on Rational to support isWithinTolerance and isCloseTo
- on
-
- Rational
Methods
-
isCloseTo(
Rational other, {Rational? relativeTolerance, Rational? absoluteTolerance}) → bool -
Available on Rational, provided by the RationalToleranceExtension extension
Checks if this Rational is close tootherwithin the specified tolerances. -
isWithinTolerance(
Rational target, Rational tolerance) → bool -
Available on Rational, provided by the RationalToleranceExtension extension
Checks if this Rational is within a fixedtoleranceof thetargetvalue.