List of utility methods to do BigDecimal Floor
BigDecimal | floor(BigDecimal dividend, int divisor) floor BigDecimal denominator = BigDecimal.valueOf(divisor); if (dividend == null || divisor == 0 || dividend.remainder(denominator).equals(BigDecimal.ZERO)) { return dividend; BigDecimal factor = dividend.divideToIntegralValue(denominator); BigDecimal product = factor.multiply(denominator); return product; |
BigInteger | floor(BigDecimal x) floor return x.setScale(0, RoundingMode.FLOOR).unscaledValue();
|
BigDecimal | floor1(BigDecimal number) floor return number.setScale(0, RoundingMode.FLOOR);
|