code: public static double trunc(Double number) {
          if (number < 0d) {
              return Math.ceil(number);
          }
          return Math.floor(number);
      }
docs: Truncate the value
  
  @param number a Double
  @return the Double truncated to 0 decimal places
  @since 1.6.4