BIS fnc sortNum: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
(page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
|arma2|= Game name


|1.00|= Game version
|1.00|= Game version
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
|Sorts an array of numbers from lowest (left) to highest (right). The passed array is modified by reference.
/************************************************************
This function uses the quick sort algorithm.|= Description
Sort Numbers
 
Sorts an array of numbers from lowest (left) to highest (right).
The passed array is modified by reference.
 
This function uses the quick sort algorithm.
************************************************************/
 
 
//set up a function for recursion
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_sortNum]]; --> |= Syntax
|array call '''BIS_fnc_sortNum'''|= Syntax


|p1= |= Parameter 1
|p1= array: [[Array]] - Array of numbers.|= Parameter 1


| |= Return value
|[[Array]] - Sorted array|= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>[5,9,987,6,97,8,6] [[call]] '''BIS_fnc_sortNum''';//Returns [5,6,6,8,9,97,987]</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| [[BIS_fnc_sortAlphabetically]], [[BIS_fnc_sortBy]], [[sort]] |= See also
|[[BIS_fnc_randomInt]] [[BIS_fnc_geometricMean]] [[BIS_fnc_arithmeticMean]] [[BIS_fnc_nearestNum]] [[BIS_fnc_roundNum]]|= See also
}}


}}


<h3 style="display:none">Notes</h3>
<h3 style="display:none">Notes</h3>

Revision as of 17:06, 26 April 2018

Hover & click on the images for description

Description

Description:
Sorts an array of numbers from lowest (left) to highest (right). The passed array is modified by reference. This function uses the quick sort algorithm.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
array call BIS_fnc_sortNum
Parameters:
array: Array - Array of numbers.
Return Value:
Array - Sorted array

Examples

Example 1:
[5,9,987,6,97,8,6] call BIS_fnc_sortNum;//Returns [5,6,6,8,9,97,987]

Additional Information

See also:
BIS_fnc_randomInt BIS_fnc_geometricMean BIS_fnc_arithmeticMean BIS_fnc_nearestNum BIS_fnc_roundNum

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