public static BigDecimal trunc(BigDecimal number, int precision) {
        return number.setScale(precision, RoundingMode.DOWN);
    }
public static BigDecimal trunc ( BigDecimal number , int precision ) { return number . setScale ( precision , RoundingMode . DOWN ) ; }
Truncate the value

@param number a BigDecimal
@param precision the number of decimal places to keep
@return a BigDecimal truncated to the number of decimal places specified by precision
@see #trunc(java.math.BigDecimal)
@since 2.5.0