toNearestThird method

Rational toNearestThird([
  1. RoundingMode mode = RoundingMode.halfUp
])

Rounds the rational number to the nearest third

Parameters:

Returns: The rational number rounded to the nearest third

Implementation

Rational toNearestThird([RoundingMode mode = RoundingMode.halfUp]) {
  return toNearest(RationalConstants.third, mode: mode);
}