IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 9, 2010, 4:40:56 PM (16 years ago)
Author:
eugene
Message:

adding features to support psphotStack

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/stackphot.20100406/psModules/src/objects/pmSource.c

    r27531 r27648  
    10651065}
    10661066
     1067// sort by X (ascending)
     1068int pmSourceSortByX (const void **a, const void **b)
     1069{
     1070    pmSource *A = *(pmSource **)a;
     1071    pmSource *B = *(pmSource **)b;
     1072
     1073    psF32 fA = (A->peak == NULL) ? 0 : A->peak->x;
     1074    psF32 fB = (B->peak == NULL) ? 0 : B->peak->x;
     1075
     1076    psF32 diff = fA - fB;
     1077    if (diff > FLT_EPSILON) return (+1);
     1078    if (diff < FLT_EPSILON) return (-1);
     1079    return (0);
     1080}
     1081
    10671082// sort by Seq (ascending)
    10681083int pmSourceSortBySeq (const void **a, const void **b)
Note: See TracChangeset for help on using the changeset viewer.