BIS fnc arrayShuffle: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
|r1= [[Array]] - a new array instance | |r1= [[Array]] - a new array instance | ||
|x1= < | |x1= <sqf>[1,2,3] call BIS_fnc_arrayShuffle; // can return [1,2,3] (the original order), [3,1,2], [2,3,1], [1,3,2], [2,1,3] or [3,2,1]</sqf> | ||
|seealso= [[sort]] [[BIS_fnc_sortBy]] [[random]] | |seealso= [[sort]] [[BIS_fnc_sortBy]] [[random]] | ||
}} | }} |
Latest revision as of 23:13, 12 July 2022
Description
- Description:
- Return a new array with randomized order of elements from input array.
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- array call BIS_fnc_arrayShuffle
- Parameters:
- array: Array
- Return Value:
- Array - a new array instance
Examples
- Example 1:
- [1,2,3] call BIS_fnc_arrayShuffle; // can return [1,2,3] (the original order), [3,1,2], [2,3,1], [1,3,2], [2,1,3] or [3,2,1]
Additional Information
- See also:
- sort BIS_fnc_sortBy random
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