round() Operation
Syntax |
| |
---|---|---|
Semantics | Rounds float to a given base. The result is of type Float. If you want to remove the fraction then
| |
Substitutables |
| Can be any variable or object attribute having the type Float. |
| Is of type Float and encodes the base to be rounded to. For examples, see the table below. | |
Examples |
CODE
|
Some Examples
| Base | Rounding Result |
---|---|---|
3.1 | 1.0 | 3 |
3 | 1.0 | 3 |
3.499 | 1.0 | 3 |
3.999 | 1.0 | 4 |
3.5 | 1.0 | 4 |
3.501 | 1.0 | 4 |
-3.1 | 1.0 | -3 |
-3 | 1.0 | -3 |
-3.499 | 1.0 | -3 |
-3.999 | 1.0 | -4 |
-3.5 | 1.0 | -4 |
-3.501 | 1.0 | -4 |
999999999999999999999999999.499 | 0.001 | 999999999999999999999999999.499 |
3.499 | 0.001 | 3.499 |
3.499 | 0.01 | 3.5 |
3.499 | 0.1 | 3.5 |
3.499 | 0.5 | 3.5 |
3.499 | 1.0 | 3 |
3.499 | 10.0 | 0 |
-3.499 | 0.001 | -3.499 |
-3.499 | 0.01 | -3.5 |
-3.499 | 0.1 | -3.5 |
-3.499 | 0.5 | -3.5 |
-3.499 | 1.0 | -3 |
-3.499 | 10.0 | 0 |
ActionScript_TypeConversions_Example
Click here to download a simple example model that different possibilities for type conversions between Float, Integer, String, and Boolean types in Scheer PAS Designer.
Related Documentation: