Tudor Bărăscu 9a894bad76 improve round function help
address review

address review
2025-08-09 18:42:42 +02:00

31 lines
930 B
Plaintext

{
"name": "round",
"type": "function",
"groups": ["Math"],
"description": "Rounds a number to number of decimal places. The rounding is done to the nearest number. The ceil or floor functions can be used if rounding up or down is required.",
"arguments": [{
"arg": "value",
"description": "decimal number to be rounded"
}, {
"arg": "places",
"optional": true,
"default": "0",
"description": "Optional integer representing number of places to round decimals to. For negative integers the rounding is done to the left of the decimal point."
}],
"examples": [{
"expression": "round(1234.567, 2)",
"returns": "1234.57"
}, {
"expression": "round(1234.567)",
"returns": "1235"
}, {
"expression": "round(1234.567, -1)",
"returns": "1230"
}, {
"expression": "round(1234.567, -2)",
"returns": "1200"
}],
"tags": ["rounds", "places", "decimal", "number"]
}