Index: trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- trunk/psLib/src/astronomy/psCoord.c	(revision 2104)
+++ trunk/psLib/src/astronomy/psCoord.c	(revision 2197)
@@ -10,6 +10,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-14 01:17:50 $
+*  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-10-26 21:24:42 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -58,37 +58,4 @@
 /*****************************************************************************/
 
-static float p_psArg(float x, float y);
-
-/******************************************************************************
-XXX: Verify this arc tan function.
-XXX: macro
-XXX: I don't think this arg() is correct.
- *****************************************************************************/
-
-float p_psArg(float x,
-              float y)
-{
-    if (y!= 0.0) {
-        return(atan(y/x));
-    } else {
-        return(0.5 * M_PI);
-    }
-    return (0.0);
-    /*
-        if (x > 0) {
-            return (atan(y / x));
-        } else if ((x == 0) && (y == 0)) {
-            return (0.5 * M_PI);
-        } else if ((x == 0) && (y == 0)) {
-            return (-0.5 * M_PI);
-        } else if ((x == 0) && (y == 0)) {
-            return (M_PI + atan(y / x));
-        } else if ((x == 0) && (y == 0)) {
-            return (-M_PI + atan(y / x));
-        }
-        psAbort(__func__, "Unacceptable range for (p_psArg(%f, %f).\n", x, y);
-    */
-}
-
 /*****************************************************************************/
 /* FUNCTION IMPLEMENTATION - PUBLIC                                          */
@@ -292,10 +259,10 @@
     if (projection->type == PS_PROJ_TAN) {
         R = sqrt((coord->x * coord->x) + (coord->y * coord->y));
-        tmp->d = p_psArg(-coord->y, coord->x);
+        tmp->d = atan2(-coord->y, coord->x);
         tmp->r = atan(180.0 / (R * M_PI));
 
     } else if (projection->type == PS_PROJ_SIN) {
         R = sqrt((coord->x * coord->x) + (coord->y * coord->y));
-        tmp->d = p_psArg(-coord->y, coord->x);
+        tmp->d = atan2(-coord->y, coord->x);
         tmp->r = acos((R * M_PI) / 180.0);
 
@@ -314,5 +281,5 @@
         chu2 *= chu2;
         chu = sqrt(1.0 - chu1 - chu2);
-        tmp->d = 2.0 * p_psArg((2.0 * chu * chu) - 1.0, (coord->x * chu * M_PI) / 360.0);
+        tmp->d = 2.0 * atan2((2.0 * chu * chu) - 1.0, (coord->x * chu * M_PI) / 360.0);
         tmp->r = asin((coord->y * chu * M_PI) / 180.0);
 
