code: public static double round(double value, int decimals, RoundingMode roundingMode) {
  		if (decimals < 0) {
  			throw new IllegalArgumentException("Invalid number of decimal places");
  		}
  
  		BigDecimal bd = new BigDecimal(value);
  		return bd.setScale(decimals, roundingMode).doubleValue();
  	}
docs: Rounds a number to the specified number of decomal places.
  
  @since 1.1
  @param value the number to round
  @param decimals the number of decimal places
  @param roundingMode the method to use for rounding
  @return the rounded number