double round(double val, int scale)
Rounds the given value to the specified number of decimal places. The value is rounded using the BigDecimal.ROUND_HALF_UP method (rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up).
Input Parameters
val | Integer The value to round. |
scale | Integer The number of digits to the right of the decimal point. |
Return Value
Integer The rounded value. |