Changeset 5672 for trunk/psphot/src/psphotSortBySN.c
- Timestamp:
- Dec 4, 2005, 5:33:32 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotSortBySN.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotSortBySN.c
r4949 r5672 18 18 } 19 19 20 // sort by Y (ascending) 21 int psphotSortByY (const void **a, const void **b) 22 { 23 pmSource *A = *(pmSource **)a; 24 pmSource *B = *(pmSource **)b; 25 26 psF32 fA = (A->moments == NULL) ? 0 : A->moments->y; 27 psF32 fB = (B->moments == NULL) ? 0 : B->moments->y; 28 29 psF32 diff = fA - fB; 30 if (diff > FLT_EPSILON) return (+1); 31 if (diff < FLT_EPSILON) return (-1); 32 return (0); 33 } 34
Note:
See TracChangeset
for help on using the changeset viewer.
