src/org/tiefaces/common/FacesUtility.java
public static double round(final double value, final int places) {
		if (places < 0) {
			throw new IllegalArgumentException();
		}

		BigDecimal bd = BigDecimal.valueOf(value);
		bd = bd.setScale(places, RoundingMode.HALF_UP);
		return bd.doubleValue();
	}
public static double round(final double value, final int places) {
		if (places < 0) {
			throw new IllegalArgumentException();
		}

		BigDecimal bd = BigDecimal.valueOf(value);
		bd = bd.setScale(places, RoundingMode.HALF_UP);
		return bd.doubleValue();
	}
public static double round ( final double value , final int places ) { if ( places < 0 ) { throw new IllegalArgumentException ( ) ; } BigDecimal bd = BigDecimal . valueOf ( value ) ; bd = bd . setScale ( places , RoundingMode . HALF_UP ) ; return bd . doubleValue ( ) ; }
round number according to decimal places.

@param value
double value.
@param places
decimal places.
@return rounded number.
round number according to decimal places .