round(a)
|
Group |
Rounds a to the nearest Integer value. The result will have the data type BigDecimal if the param a was a BigDecimal or BigInteger. Otherwise, the result will have the type Double.
Hint: Please use values type-safe. In a commercial context, values should consistently be handled as BigDecimal data types. In a scientific field, the high-precision data type Double is better suited.
Description of Parameters
|
Parameter |
Description |
|
a |
Value. |
Examples
|
Parameter a |
Result |
|
1.2 |
1 |
|
1.5 |
2 |
|
-2.3 |
-2 |
|
-2.5 |
-3 |