Difference between revisions of "BIS fnc arrayShuffle"

From Bohemia Interactive Community
Jump to navigation Jump to search
(Undo revision 97824 by Zectbumo (talk) this will be corrected)
(Page filling)
Line 1: Line 1:
 
 
{{Function|= Comments
 
{{Function|= Comments
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| arma3 |= Game name
+
| arma3 |Game name=
  
|0.58|= Game version
+
|0.58|Game version=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| <pre>/*
+
| Return a new array with randomized order of elements from input array.<br />
+
{{Informative|This function does not ''necessarily'' change array order, as randomisation can return the original values order.}} |Description=
Description:
 
This returns a new array with randomized order of elements from input array
 
 
Parameters:
 
_this: ARRAY
 
 
Returns:
 
ARRAY
 
 
Example:
 
[1, 2, 3] call BIS_fnc_arrayShuffle
 
Returns: [2, 3, 1] (For example)
 
*/
 
 
 
//The container
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
 
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| <!-- [] call [[BIS_fnc_arrayShuffle]]; --> |= Syntax
+
| array call [[BIS_fnc_arrayShuffle]] |Syntax=
  
|p1= |= Parameter 1
+
|p1= array: [[Array]] |Parameter 1=
  
| |= Return value
+
| [[Array]] - a new array instance |Return value=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
|x1= <code></code> |=  
+
|x1= <code>[1,2,3] [[call]] [[BIS_fnc_arrayShuffle]]; {{codecomment|// can return '''[1,2,3]''', [3,1,2], [2,3,1], [1,3,2], [2,1,3] or [3,2,1]}}</code> |Example 1=
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
  
| |= See also
+
| [[sort]], [[BIS_fnc_sortBy]], [[random]] |See also=
 
 
 
}}
 
}}
  
Line 50: Line 32:
  
 
<h3 style="display:none">Bottom Section</h3>
 
<h3 style="display:none">Bottom Section</h3>
 +
[[Category:Functions|{{uc:arrayShuffle}}]]
 
[[Category:Function Group: Arrays|{{uc:arrayShuffle}}]]
 
[[Category:Function Group: Arrays|{{uc:arrayShuffle}}]]
[[Category:Functions|{{uc:arrayShuffle}}]]
 
 
[[Category:{{Name|arma3}}: Functions|{{uc:arrayShuffle}}]]
 
[[Category:{{Name|arma3}}: Functions|{{uc:arrayShuffle}}]]

Revision as of 13:42, 29 May 2018

Introduced with Arma 3 version 0.58
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
0.58

Description

Description:
Return a new array with randomized order of elements from input array.
This function does not necessarily change array order, as randomisation can return the original values order.

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], [3,1,2], [2,3,1], [1,3,2], [2,1,3] or [3,2,1]

Additional Information

Execution:
call
Multiplayer:
-
See also:
sortBIS_fnc_sortByrandom

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section