IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 24, 2007, 1:43:47 PM (19 years ago)
Author:
rhl
Message:

Renamed psphotSortBy* to psphotSourceSortBy*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSortBySN.c

    r12792 r13006  
    11# include "psphotInternal.h"
    22
     3
    34// sort by SN (descending)
    4 int psphotSortBySN (const void **a, const void **b)
     5int pmPeakSortBySN (const void **a, const void **b)
     6{
     7    pmPeak *A = *(pmPeak **)a;
     8    pmPeak *B = *(pmPeak **)b;
     9
     10    psF32 fA = A->SN;
     11    psF32 fB = B->SN;
     12    if (isnan (fA)) fA = 0;
     13    if (isnan (fB)) fB = 0;
     14
     15    psF32 diff = fA - fB;
     16    if (diff > FLT_EPSILON) return (-1);
     17    if (diff < FLT_EPSILON) return (+1);
     18    return (0);
     19}
     20
     21// sort by Y (ascending)
     22int pmPeakSortByY (const void **a, const void **b)
     23{
     24    pmPeak *A = *(pmPeak **)a;
     25    pmPeak *B = *(pmPeak **)b;
     26
     27    psF32 fA = A->y;
     28    psF32 fB = B->y;
     29
     30    psF32 diff = fA - fB;
     31    if (diff > FLT_EPSILON) return (+1);
     32    if (diff < FLT_EPSILON) return (-1);
     33    return (0);
     34}
     35
     36// sort by SN (descending)
     37int pmSourceSortBySN (const void **a, const void **b)
    538{
    639    pmSource *A = *(pmSource **)a;
     
    1952
    2053// sort by Y (ascending)
    21 int psphotSortByY (const void **a, const void **b)
     54int pmSourceSortByY (const void **a, const void **b)
    2255{
    2356    pmSource *A = *(pmSource **)a;
Note: See TracChangeset for help on using the changeset viewer.