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