Index: trunk/Ohana/src/opihi/cmd.astro/rotcurve.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/rotcurve.c	(revision 7917)
+++ trunk/Ohana/src/opihi/cmd.astro/rotcurve.c	(revision 19823)
@@ -70,6 +70,6 @@
   gfits_scan (&out[0].header, "CRPIX2", "%lf", 1, &Yo);
 
-  while (L >= 360) {L -= 360.0;}
-  while (L < 0.0)  {L += 360.0;}
+  L = ohana_normalize_angle (L);
+
   X = (L - Lo) / dL + Xo;
   if ((X >= Nx) || (X < 0)) {
