Index: trunk/psLib/src/math/psSpline.c
===================================================================
--- trunk/psLib/src/math/psSpline.c	(revision 1233)
+++ trunk/psLib/src/math/psSpline.c	(revision 1281)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-15 23:52:34 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-07-22 23:45:16 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -29,9 +29,15 @@
 #include "psFunctions.h"
 
-#include "float.h"
-#include <math.h>
 #include <gsl/gsl_rng.h>
 #include <gsl/gsl_randist.h>
-
+/*****************************************************************************/
+/* DEFINE STATEMENTS                                                         */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/* TYPE DEFINITIONS                                                          */
+/*****************************************************************************/
 static void polynomial1DFree(psPolynomial1D *myPoly);
 static void polynomial2DFree(psPolynomial2D *myPoly);
@@ -44,4 +50,22 @@
 
 /*****************************************************************************/
+/* GLOBAL VARIABLES                                                          */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/* FILE STATIC VARIABLES                                                     */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
+/* FUNCTION IMPLEMENTATION - LOCAL                                           */
+/*****************************************************************************/
+
+// None
+
+/*****************************************************************************/
 /*  FUNCTION IMPLEMENTATION - PUBLIC                                         */
 /*****************************************************************************/
@@ -55,21 +79,20 @@
 psGaussian(float x,
            float mean,
-           float stddev,
+           float sigma,
            int normal)
 {
-    float tmp = 0.0;
+    float tmp = 1.0;
 
     if (normal == 1) {
         #ifdef DARWIN
-        tmp = 1.0 / (float)sqrt(2.0 * M_PI * (stddev * stddev));
+        tmp = 1.0 / (float)sqrt(2.0 * M_PI * (sigma * sigma));
         #else
 
-        tmp = 1.0 / sqrtf(2.0 * M_PI * (stddev * stddev));
+        tmp = 1.0 / sqrtf(2.0 * M_PI * (sigma * sigma));
         #endif
 
-        return(tmp * exp(-((x-mean) * (x-mean)) / (2.0 * stddev * stddev)));
-    } else {
-        return(exp(-((x-mean) * (x-mean)) / (2.0 * stddev * stddev)));
-    }
+    }
+
+    return(tmp * exp(-((x-mean) * (x-mean)) / (2.0 * sigma * sigma)));
 }
 
@@ -328,7 +351,16 @@
     float xSum = 1.0;
 
+    if (NULL == myPoly) {
+        psAbort(__func__, "psEvalPolynomial1D(): myPoly is NULL\n");
+    }
+
+
     // NOTE: Do we want to flag this case?
     if (myPoly->n == 0) {
         return(1.0);
+    }
+
+    if (NULL == myPoly->coeff) {
+        psAbort(__func__, "psEvalPolynomial1D(): myPoly->coeff is NULL\n");
     }
 
