It is a feature, a bug or an enhancement?
This is an enhancement
Is it duplicated?
Could be related to #11.
Description:
It would be great to support rounding modes just as BigDecimal Java Library or Decimal Python Library do: (ignore ROUND_CEILING and ROUND_FLOOR, since there are already specific methods for that)
ROUND_DOWN: Rounding mode to round towards zero.
ROUND_HALF_DOWN: Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.
ROUND_HALF_EVEN: Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor.
ROUND_HALF_UP: Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.
ROUND_UNNECESSARY: Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary.
It is a feature, a bug or an enhancement? This is an enhancement
Is it duplicated? Could be related to #11.
Description: It would be great to support rounding modes just as BigDecimal Java Library or Decimal Python Library do: (ignore
ROUND_CEILING
andROUND_FLOOR
, since there are already specific methods for that)ROUND_DOWN
: Rounding mode to round towards zero.ROUND_HALF_DOWN
: Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.ROUND_HALF_EVEN
: Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor.ROUND_HALF_UP
: Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.ROUND_UNNECESSARY
: Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary.ROUND_UP
: Rounding mode to round away from zero.Btw, thanks for this great library 🎉