code: public static double round(double toBeRounded, int digits) {
  		if (digits < 0) {
  			QuickUtils.log.e("must be greater than 0");
  			return 0;
  		}
  		String formater = "";
  		for (int i = 0; i < digits; i++) {
  			formater += "#";
  		}
  
  		DecimalFormat twoDForm = new DecimalFormat("#." + formater, new DecimalFormatSymbols(Locale.US));
  		return Double.valueOf(twoDForm.format(toBeRounded));
  	}
docs: Rounds a double value to a certain number of digits
  
  @param toBeRounded
  number to be rounded
  @param digits
  number of digits to be rounded
  @return the double rounded