Changeset 4129 for trunk/psphot/src/by_SN.c
- Timestamp:
- Jun 6, 2005, 11:20:45 PM (21 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/by_SN.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
-
Property svn:ignore
set to
bin
-
Property svn:ignore
set to
-
trunk/psphot/src/by_SN.c
r4115 r4129 1 1 # include "psphot.h" 2 2 3 // sort by SN (descending) 3 4 int by_SN (const void **a, const void **b) 4 5 { 5 psSource *A = * a;6 psSource *B = * b;6 psSource *A = *(psSource **)a; 7 psSource *B = *(psSource **)b; 7 8 8 9 psF32 fA = (A->moments == NULL) ? 0 : A->moments->SN; … … 10 11 11 12 psF32 diff = fA - fB; 12 if (diff <FLT_EPSILON) return (-1);13 if (diff >FLT_EPSILON) return (+1);13 if (diff > FLT_EPSILON) return (-1); 14 if (diff < FLT_EPSILON) return (+1); 14 15 return (0); 15 16 }
Note:
See TracChangeset
for help on using the changeset viewer.
