round() Operation
| Syntax |
NONE
| |
|---|---|---|
| Semantics |
| |
| Substitutables | aFloat | Can be any variable or object attribute having the type Float. |
base | Is of type Float and encodes the base to be rounded to. For examples, see the table below. | |
| Examples |
NONE
| |
Table: Base Examples for the round() Operation
Rounding Result |
| Base |
|---|---|---|
| 3 | 3.1 | 1.0 |
| 3 | 3 | 1.0 |
| 3 | 3.499 | 1.0 |
| 4 | 3.999 | 1.0 |
| 4 | 3.5 | 1.0 |
| 4 | 3.501 | 1.0 |
| -3 | -3.1 | 1.0 |
| -3 | -3 | 1.0 |
| -3 | -3.499 | 1.0 |
| -4 | -3.999 | 1.0 |
| -4 | -3.5 | 1.0 |
| -4 | -3.501 | 1.0 |
| 999999999999999999999999999.499 | 999999999999999999999999999.499 | 0.001 |
| 3.499 | 3.499 | 0.001 |
| 3.5 | 3.499 | 0.01 |
| 3.5 | 3.499 | 0.1 |
| 3.5 | 3.499 | 0.5 |
| 3 | 3.499 | 1.0 |
| 0 | 3.499 | 10.0 |
| -3.499 | -3.499 | 0.001 |
| -3.5 | -3.499 | 0.01 |
| -3.5 | -3.499 | 0.1 |
| -3.5 | -3.499 | 0.5 |
| -3 | -3.499 | 1.0 |
| 0 | -3.499 | 10.0 |
Related Pages: