2015-06-11 12:02:27 +10:00
|
|
|
{
|
2015-09-20 17:12:43 +02:00
|
|
|
"name": "round",
|
|
|
|
"type": "function",
|
2015-06-11 12:02:27 +10:00
|
|
|
"description": "Rounds a number to number of decimal places.",
|
2015-09-20 17:12:43 +02:00
|
|
|
"arguments": [
|
2016-03-29 16:22:04 +11:00
|
|
|
{"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. Can be negative."}
|
2015-09-20 17:12:43 +02:00
|
|
|
],
|
|
|
|
"examples": [
|
|
|
|
{ "expression":"round(1234.567, 2)", "returns":"1234.57"},
|
|
|
|
{ "expression":"round(1234.567)", "returns":"1235"}
|
|
|
|
]
|
2015-06-11 12:02:27 +10:00
|
|
|
}
|