Return a number that will be rounded to the decimal places which are given as input. If the decimal places to be rounded are not specified, it is considered as 0, and it will round to the nearest integer.
This function does not generate a change.
round(number, places)
Argument | Type | Description |
---|---|---|
number | int/float (required) | Number to be rounded. |
places | int (optional) | Number of digits. 0 is nog given. |
Returns with a float or int, depending on the number input type.
ound()_ function examples:
[
round(MATH_PI, 2),
round(5.8123),
round(45634, -3),
]
Return value in JSON format
[
3.14,
6.0,
46000
]