From Bohemia Interactive Community
Click on the images for descriptions
- Armed Assault
- Rounds up or down to the closest integer.
- Example 1:
_val= round 5.25, result is 5
- Example 2:
_val= round 5.55, result is 6
- Posted on February 23, 2018 - 05:21 (UTC)
- If you want to round to a specific place past the decimal point, use toFixed and parseNumber together.
parseNumber (3.16666 toFixed 1); // 3.2