round
Jump to navigation
Jump to search
Description
- Description:
- Rounds up or down to the closest integer.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
_val= round 5.25, result is 5
- Example 2:
_val= round 5.55, result is 6
Additional Information
- See also:
- Math Commands : ceilfloor
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on August 28, 2015 - 13:59 (UTC)
- Moerderhoschi
-
please note when using the round command that the first and the last digit occur only the half of the time then the other digits. Tested with ArmA 2 v1.62
countArray = [0,0,0,0,0]; for "_i" from 1 to 10000 do { number = (round random 4); countArray set [number,(countArray select number) + 1]; };
// countArray example result -> [1287,2517,2495,2460,1241]