IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 1, 2010, 4:38:52 PM (16 years ago)
Author:
eugene
Message:

moved pmPhotObjSortByX to psModules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20100621/psModules/src/objects/pmPhotObj.c

    r28643 r28821  
    103103    return (0);
    104104}
     105
     106// sort by X (ascending)
     107int pmPhotObjSortByX (const void **a, const void **b)
     108{
     109    pmPhotObj *objA = *(pmPhotObj **)a;
     110    pmPhotObj *objB = *(pmPhotObj **)b;
     111
     112    psF32 fA = objA->x;
     113    psF32 fB = objB->x;
     114
     115    psF32 diff = fA - fB;
     116    if (diff > FLT_EPSILON) return (+1);
     117    if (diff < FLT_EPSILON) return (-1);
     118    return (0);
     119}
Note: See TracChangeset for help on using the changeset viewer.