toNearestThird method
Rounds the rational number to the nearest third
Parameters:
mode: The rounding mode to apply. Defaults to RoundingMode.halfUp
Returns: The rational number rounded to the nearest third
Implementation
Rational toNearestThird([RoundingMode mode = RoundingMode.halfUp]) {
return toNearest(RationalConstants.third, mode: mode);
}