Shuffles an array’s contents into random order.
_array | Array of values to shuffle <Array, containing anything except nil> |
_inPlace | true: alter array, false: copy array (optional, default: false) <BOOLEAN> |
Array containing shuffled values <Array>
_result = [[1, 2, 3, 4, 5]] call CBA_fnc_shuffle; // _result could be [4, 2, 5, 1, 3] _array = [1, 2, 3, 4, 5]; [_array, true] call CBA_fnc_shuffle; // _array could now be [4, 2, 5, 1, 3]
toadlife (version 1.01) http://toadlife.net rewritten by Spooner, Dorbedo