Index: trunk/psLib/src/math/psEllipse.c
===================================================================
--- trunk/psLib/src/math/psEllipse.c	(revision 19995)
+++ trunk/psLib/src/math/psEllipse.c	(revision 19996)
@@ -6,4 +6,5 @@
 #include <assert.h>
 #include "psConstants.h"
+#include "psTrace.h"
 #include "psEllipse.h"
 
@@ -47,12 +48,13 @@
 // ellipse rotation (major, minor, theta) -> (x2, y2, xy)
 // XXXX handle case where e0 < LIMIT
-psErrorCode psEllipsePolToAxes(const psEllipsePol pol,
-			       const float minMinorAxis,
-			       psEllipseAxes *axes)
-{
-    axes->theta = +0.5 * atan2 (pol.e2, pol.e1); // theta in radians
-
-    double cs = cos(2*axes->theta);
-    double sn = sin(2*axes->theta);
+psEllipseAxes psEllipsePolToAxes(const psEllipsePol pol,
+				 const float minMinorAxis)
+{
+    psEllipseAxes axes;
+
+    axes.theta = +0.5 * atan2 (pol.e2, pol.e1); // theta in radians
+
+    double cs = cos(2*axes.theta);
+    double sn = sin(2*axes.theta);
     double ds = 0;
 
@@ -66,23 +68,22 @@
     if (pol.e0 < LIMIT) {
 	// if e0 is too small, we are really out of luck
-	axes->major = minMinorAxis;
-	axes->minor = minMinorAxis;
+	axes.major = minMinorAxis;
+	axes.minor = minMinorAxis;
     } else {
 	if (2.0*(pol.e0 - ds) < LIMIT) {
 	    // if e0 - ds is too small, saturate the minor axis at minMinorAxis
-	    axes->major = sqrt(pol.e0 - LIMIT);
-	    axes->minor = sqrt(LIMIT);
+	    axes.major = sqrt(pol.e0 - LIMIT);
+	    axes.minor = sqrt(LIMIT);
 	} else {
 	    // normal values for e0 & ds
-	    axes->major = sqrt(0.5*(pol.e0 + ds));
-	    axes->minor = sqrt(0.5*(pol.e0 - ds));
+	    axes.major = sqrt(0.5*(pol.e0 + ds));
+	    axes.minor = sqrt(0.5*(pol.e0 - ds));
 	}
     }
 
-    if (!isfinite(axes->major) || !isfinite(axes->minor) || !isfinite(axes->theta)) {
-	return psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Shape of object is NaN");
-    }
-
-    return PS_ERR_NONE;
+    if (!isfinite(axes.major) || !isfinite(axes.minor) || !isfinite(axes.theta)) {
+	psTrace ("psLib.math", 5, "Shape of object is NaN");
+    }
+    return axes;
 }
 
Index: trunk/psLib/src/math/psEllipse.h
===================================================================
--- trunk/psLib/src/math/psEllipse.h	(revision 19995)
+++ trunk/psLib/src/math/psEllipse.h	(revision 19996)
@@ -2,6 +2,6 @@
  * @brief functions to manipulate sparse matrices equations
  *
- * $Revision: 1.6 $ $Name: not supported by cvs2svn $
- * $Date: 2007-12-12 21:01:32 $
+ * $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ * $Date: 2008-10-08 21:51:34 $
  * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
  */
@@ -76,8 +76,7 @@
 ///
 /// XXX This API goes against the PS convention of outputs being first.
-psErrorCode psEllipsePolToAxes(const psEllipsePol pol, ///< Polarisation of ellipse
-                               const float minMinorAxis, ///< Minimum allowed minor axis
-                               psEllipseAxes *axes ///< Output ellipse axes
-                               );
+psEllipseAxes psEllipsePolToAxes(const psEllipsePol pol, ///< Polarisation of ellipse
+				 const float minMinorAxis ///< Minimum allowed minor axis
+    );
 
 /// @}
