code: public static double round(Double number, int precision) {
          return Math.floor(number *Math.pow(10,precision)+0.5)/Math.pow(10,precision);
      }
docs: Round the value
  
  @param number a Double
  @param precision the number of decimal places to keep
  @return the Double rounded to the number of decimal places specified by precision
  @since 1.6.4