KDArray.c
/*
 * Compares between two PointAxis objects based on their axis coordinate value.
 *
 * @param p 		address of the first pointAxis
 * @param q			address of the second pointAxis
 *
 * @return 0 if values are equal (difference is less than Epsilon)
 * 		   1 if value of p is bigger than q
 * 		  -1 if value of q is bigger than p
 */
Compares between two PointAxis objects based on their axis coordinate value.

@param p             address of the first pointAxis
@param q                     address of the second pointAxis

@return 0 if values are equal (difference is less than Epsilon)
1 if value of p is bigger than q
-1 if value of q is bigger than p
Compares between two PointAxis objects based on their axis coordinate value . @param p address of the first pointAxis @param q address of the second pointAxis @return 0 if values are equal ( difference is less than Epsilon ) 1 if value of p is bigger than q - 1 if value of q is bigger than p
int pointComparator(const void *p, const void *q) {
	PointAxis p1 = *(const PointAxis *) p;
	PointAxis p2 = *(const PointAxis *) q;
	register double p1ax = spPointGetAxisCoor(p1->pnt, p1->axis);
	register double p2ax = spPointGetAxisCoor(p2->pnt, p2->axis);
	if (fabs(p1ax - p2ax) < EPS)
		return 0;
	if (p1ax - p2ax < 0)
		return -1;
	return 1;
}
int pointComparator ( const void * p , const void * q ) { PointAxis p1 = * ( const PointAxis * ) p ; PointAxis p2 = * ( const PointAxis * ) q ; register double p1ax = spPointGetAxisCoor ( p1 -> pnt , p1 -> axis ) ; register double p2ax = spPointGetAxisCoor ( p2 -> pnt , p2 -> axis ) ; if ( fabs ( p1ax - p2ax ) < EPS ) return 0 ; if ( p1ax - p2ax < 0 ) return -1 ; return 1 ; }
Compares between two PointAxis objects based on their axis coordinate value.
Compares between two PointAxis objects based on their axis coordinate value .
/* use of register because this function is called many many times */