IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36613


Ignore:
Timestamp:
Mar 21, 2014, 11:43:27 AM (12 years ago)
Author:
eugene
Message:

handle 0,360 boundary correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140206/Ohana/src/libdvo/src/RegionHostTable.c

    r36577 r36613  
    203203    onBorder =
    204204      (myhost->Rmax == altHost->Rmin) &&
     205      (myhost->Dmin <= altHost->Dmax) &&
     206      (myhost->Dmax >= altHost->Dmin);
     207    if (onBorder) goto add_neighbor;
     208
     209    // handle the 0,360 boundary (Rmin,Rmax are in the range 0,360, but 0 == 360)
     210    onBorder =
     211      (myhost->Rmin == 0.0) &&
     212      (altHost->Rmax == 360.0) &&
     213      (myhost->Dmin <= altHost->Dmax) &&
     214      (myhost->Dmax >= altHost->Dmin);
     215    if (onBorder) goto add_neighbor;
     216
     217    onBorder =
     218      (myhost->Rmax == 360.0) &&
     219      (altHost->Rmin == 0.0) &&
    205220      (myhost->Dmin <= altHost->Dmax) &&
    206221      (myhost->Dmax >= altHost->Dmin);
Note: See TracChangeset for help on using the changeset viewer.