Index: trunk/Ohana/src/getstar/src/ReadImageHeader.c
===================================================================
--- trunk/Ohana/src/getstar/src/ReadImageHeader.c	(revision 19259)
+++ trunk/Ohana/src/getstar/src/ReadImageHeader.c	(revision 19823)
@@ -58,6 +58,5 @@
   } else {
     /* force image to lie in 0-360 range */
-    while (image[0].coords.crval1 < 0) image[0].coords.crval1 += 360.0;
-    while (image[0].coords.crval1 > 360.0) image[0].coords.crval1 -= 360.0;
+    image[0].coords.crval1 = ohana_normalize_angle (image[0].coords.crval1);
   }
 
Index: trunk/Ohana/src/getstar/src/args.c
===================================================================
--- trunk/Ohana/src/getstar/src/args.c	(revision 19259)
+++ trunk/Ohana/src/getstar/src/args.c	(revision 19823)
@@ -96,8 +96,7 @@
     // XXX we will have issues at 0,360 boundary...
     // see code in dvo/pmeasure for fixes
-    while (REGION.Rmin > 360) REGION.Rmin -= 360.0;
-    while (REGION.Rmin <   0) REGION.Rmin += 360.0;
-    while (REGION.Rmax > 360) REGION.Rmax -= 360.0;
-    while (REGION.Rmax <   0) REGION.Rmax += 360.0;
+    REGION.Rmin = ohana_normalize_angle (REGION.Rmin);
+    REGION.Rmax = ohana_normalize_angle (REGION.Rmax);
+
     if (REGION.Dmax < REGION.Dmin) {
 	SWAP (REGION.Dmax, REGION.Dmin);
