BIS fnc sortNum: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|gr([0-9]+) = " to "|gr$1= ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
|arma2 | |game1= arma2 | ||
|version1= 1.00 | |||
|1.00 | |game2= arma2oa | ||
|version2= 1.50 | |||
|game3= tkoh | |||
|version3= 1.00 | |||
|game4= arma3 | |||
|version4= 0.50 | |||
|gr1= Arrays | |gr1= Arrays | ||
|Sorts an array of numbers from lowest (left) to highest (right). The passed array is modified by reference. | |descr= 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. | This function uses the quick sort algorithm. | ||
{{Feature|arma3| If you do not need the return value, use [[sort]] instead.}} | {{Feature|arma3|If you do not need the return value, use [[sort]] instead.}} | ||
|array call [[BIS_fnc_sortNum]] | |s1= array call [[BIS_fnc_sortNum]] | ||
|p1= array: [[Array]] | |p1= array: [[Array]] of [[Number]]s | ||
|[[Array]] - | |r1= [[Array]] - sorted array | ||
|x1= < | |x1= <sqf>[5,9,987,6,97,8,6] call BIS_fnc_sortNum; // returns [5,6,6,8,9,97,987]</sqf> | ||
|seealso= [[sort]] | |seealso= [[sort]] [[BIS_fnc_randomInt]] [[BIS_fnc_geometricMean]] [[BIS_fnc_arithmeticMean]] [[BIS_fnc_nearestNum]] [[BIS_fnc_roundNum]] | ||
}} | }} | ||
Latest revision as of 18:02, 30 June 2022
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:
- Arrays
Syntax
- Syntax:
- array call BIS_fnc_sortNum
- Parameters:
- array: Array of Numbers
- Return Value:
- Array - sorted array
Examples
- Example 1:
Additional Information
- See also:
- sort 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