Skip to content

Commit 1544090

Browse files
authored
Update sorting.inc
1 parent 8331f41 commit 1544090

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/include/sorting.inc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ native void SortStrings(char[][] array, int array_size, SortOrder order = Sort_A
9494
* @return -1 if first should go before second
9595
* 0 if first is equal to second
9696
* 1 if first should go after second
97+
*
98+
* @note If working with float arrays and arithmatic operators, elements must be retagged
99+
* through assignment or with view_as<float> to ensure floating point operations are
100+
* performed rather than integer operations.
101+
* for example: float f = elem1; if (view_as<float>(elem2) < f) /* ... */
97102
*/
98103
typedef SortFunc1D = function int (any elem1, any elem2, const any[] array, any data);
99104

0 commit comments

Comments
 (0)