BIS fnc sortNum: Difference between revisions
Jump to navigation
Jump to search
m (template:command argument fix) |
Lou Montana (talk | contribs) m (Add sort link) |
||
Line 1: | Line 1: | ||
{{Function|= | {{Function|Comments= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|arma2| | |arma2|Game name= | ||
|1.00| | |1.00|Game version= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|Sorts an array of numbers from lowest (left) to highest (right). The passed array is modified by reference. | |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= | This function uses the quick sort algorithm. | ||
{{Feature arma3| If you do not need the return value, use [[sort]] instead.}}|DESCRIPTION= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|array call | |array call [[BIS_fnc_sortNum]]|SYNTAX= | ||
|p1= array: [[Array]] - Array of numbers.|PARAMETER1= | |p1= array: [[Array]] - Array of numbers.|PARAMETER1= | ||
Line 18: | Line 20: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>[5,9,987,6,97,8,6] [[call]] | |x1= <code>[5,9,987,6,97,8,6] [[call]] [[BIS_fnc_sortNum]]; {{codecomment|// Returns [5,6,6,8,9,97,987]}}</code> |EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|[[BIS_fnc_randomInt]] [[BIS_fnc_geometricMean]] [[BIS_fnc_arithmeticMean]] [[BIS_fnc_nearestNum]] [[BIS_fnc_roundNum]]|SEEALSO= | |[[sort]], [[BIS_fnc_randomInt]] [[BIS_fnc_geometricMean]] [[BIS_fnc_arithmeticMean]] [[BIS_fnc_nearestNum]] [[BIS_fnc_roundNum]]|SEEALSO= | ||
}} | }} | ||
Revision as of 20:48, 4 August 2019
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:
- sortBIS_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