1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>MATHCompareFunc</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MATHCompareFunc <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
15<H2>Syntax</H2>
16
17<dl>
18  <dd>
19  <PRE><CODE>#include &lt;nitro/math/qsort.h&gt;
20
21typedef s32 (*MATHCompareFunc) (void *elem1, void *elem2);
22
23</CODE></PRE>
24  </dd>
25</dl><h2>Arguments</h2>
26
27<table border="1" width="100%">
28
29
30
31    <TR>
32      <TD width="176"><em><strong><font face="Courier New">elem1</font></strong></em></TD>
33      <TD width="670">Pointer to Element 1.</TD>
34    </TR>
35    <TR>
36      <TD><em><strong><font face="Courier New">elem2</font></strong></em></TD>
37      <TD>Pointer to Element 2.</TD>
38    </TR>
39  </table>
40<h2>Return Values</h2>
41<p>Returns a positive number when Element 1 should follow Element 2.<BR>Returns a negative number when Element 1 should precede Element 2.</p>
42<p>Be sure to return 0 if the comparison shows Element 1 is equal to Element 2.</p>
43<H2>Description</H2>
44<P>The comparison function type given for sorting with the <CODE><A href="MATH_QSort.html">MATH_QSort</A></CODE> function.<BR>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.</P>
45<h2>See Also</h2>
46<P><CODE><A href="MATH_QSort.html">MATH_QSort</A></CODE></P>
47<H2>Revision History</H2>
48<P>
492006/07/19 Revised the description of return values.<br> 2006/04/21 Added a description of return values.<br> 2005/04/12 Initial version.</P>
50<hr><p>CONFIDENTIAL</p></body>
51</html>
52