ArrayParser.sort() - Mtax-Development/GML-OOP GitHub Wiki
Name |
Type |
Optional |
order |
No |
Not applicable.
Sort the values in the array in the specified order, in a way depending on the type of sorting specified:
• {bool}: True for ascending and false for descending. All array values should be either numbers or strings.
• {function}: The specified function must accept two arguments to compare every value in the array with each other in pairs, then return the result as a number with following meanings:
• 0: both values are equal.
• A negative number: first argument before second one.
• A positive number: second argument before first one.