code: private double round(double number) {
      int round = (int) (number * 1000.00);
      double rest = (number * 1000.00) - round;
      if (rest >= 0.5) {
        round++;
      }
      return (round / 1000.00);
    }
docs: round a double number.
  
  @param number double
  @return double