IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2008, 8:08:31 AM (18 years ago)
Author:
eugene
Message:

replace poor code with ohana_normalize_angle

Location:
trunk/Ohana/src/getstar/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/getstar/src/ReadImageHeader.c

    r19065 r19823  
    5858  } else {
    5959    /* force image to lie in 0-360 range */
    60     while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0;
    61     while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0;
     60    image[0].coords.crval1 = ohana_normalize_angle (image[0].coords.crval1);
    6261  }
    6362
  • trunk/Ohana/src/getstar/src/args.c

    r15543 r19823  
    9696    // XXX we will have issues at 0,360 boundary...
    9797    // see code in dvo/pmeasure for fixes
    98     while (REGION.Rmin > 360) REGION.Rmin -= 360.0;
    99     while (REGION.Rmin <   0) REGION.Rmin += 360.0;
    100     while (REGION.Rmax > 360) REGION.Rmax -= 360.0;
    101     while (REGION.Rmax <   0) REGION.Rmax += 360.0;
     98    REGION.Rmin = ohana_normalize_angle (REGION.Rmin);
     99    REGION.Rmax = ohana_normalize_angle (REGION.Rmax);
     100
    102101    if (REGION.Dmax < REGION.Dmin) {
    103102        SWAP (REGION.Dmax, REGION.Dmin);
Note: See TracChangeset for help on using the changeset viewer.