MATHCompareFunc

C Specification

#include <nitro/math/qsort.h>

typedef s32 (*MATHCompareFunc) (void *elem1, void *elem2);

Arguments

elem1 Pointer to Element 1.
elem2 Pointer to Element 2.

Return Values

Returns a positive number when Element 1 should preceed Element 2. Returns a negative number when Element 1 should follow Element 2.

Description

The type of the comparison function that is passed as a comparison function for sorting with MATH_QSort. If a positive number is returned, the first element will be arranged further back in the array. If a negative is returned, the second element will be arranged further back in the array.

See Also

MATH_QSort

Revision History

04/12/2005 Initial version.