$round » History » Version 5
Per Amundsen, 02/23/2023 07:29 PM
| 1 | 1 | Per Amundsen | _Added in 1.8.10_ |
|---|---|---|---|
| 2 | |||
| 3 | *$round(N,D)* |
||
| 4 | |||
| 5 | Returns the specified floating point number rounded to the Dth decimal digit. |
||
| 6 | |||
| 7 | *Parameters* |
||
| 8 | |||
| 9 | 5 | Per Amundsen | table(ktable). |
| 10 | |*Parameter*|*Description*| |
||
| 11 | | N | The number to round. | |
||
| 12 | | D | The number of decimals to round to. | |
||
| 13 | 1 | Per Amundsen | |
| 14 | *Example* |
||
| 15 | |||
| 16 | <pre> |
||
| 17 | ; Round '3.14159' to '2' decimals. |
||
| 18 | //echo -ag $round(3.14159,2) |
||
| 19 | 2 | Per Amundsen | </pre> |