public static BigDecimal roundUpTo ( double value , double steps ) { final BigDecimal bValue = BigDecimal . valueOf ( value ) ; final BigDecimal bSteps = BigDecimal . valueOf ( steps ) ; if ( Objects . equals ( bSteps , BigDecimal . ZERO ) ) { return bValue ; } else { return bValue . divide ( bSteps , 0 , RoundingMode . CEILING ) . multiply ( bSteps ) ; } }
Returns the UP rounded value of the given value for the given steps .