$round » History » Version 2
Per Amundsen, 08/11/2015 10:08 AM
| 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 | N - The number to round.¨_(N is a double)_ |
||
| 10 | D - The number of decimals to round to. |
||
| 11 | |||
| 12 | *Example* |
||
| 13 | |||
| 14 | <pre> |
||
| 15 | ; Round '3.14159' to '2' decimals. |
||
| 16 | //echo -ag $round(3.14159,2) |
||
| 17 | 2 | Per Amundsen | </pre> |