Java Utililty Methods BigDecimal Floor

List of utility methods to do BigDecimal Floor

Description

The list of methods to do BigDecimal Floor are organized into topic(s).

Method

BigDecimalfloor(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;
BigIntegerfloor(BigDecimal x)
floor
return x.setScale(0, RoundingMode.FLOOR).unscaledValue();
BigDecimalfloor1(BigDecimal number)
floor
return number.setScale(0, RoundingMode.FLOOR);