IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 6, 2005, 11:20:45 PM (21 years ago)
Author:
eugene
Message:

further basic concepts

Location:
trunk/psphot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot

    • Property svn:ignore set to
      bin
  • trunk/psphot/src/by_SN.c

    r4115 r4129  
    11# include "psphot.h"
    22
     3// sort by SN (descending)
    34int by_SN (const void **a, const void **b)
    45{
    5     psSource *A = *a;
    6     psSource *B = *b;
     6    psSource *A = *(psSource **)a;
     7    psSource *B = *(psSource **)b;
    78
    89    psF32 fA = (A->moments == NULL) ? 0 : A->moments->SN;
     
    1011
    1112    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);
    1415    return (0);
    1516}
Note: See TracChangeset for help on using the changeset viewer.