Index: trunk/psLib/src/math/psPolynomial.h
===================================================================
--- trunk/psLib/src/math/psPolynomial.h	(revision 6348)
+++ trunk/psLib/src/math/psPolynomial.h	(revision 7766)
@@ -11,6 +11,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-02-07 23:36:15 $
+ *  @version $Revision: 1.63 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-30 02:20:06 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -307,4 +307,43 @@
 
 
+/*****************************************************************************
+    PS_POLY macros:
+*****************************************************************************/
+#define PS_ASSERT_POLY1D(NAME, RVAL) \
+if (false == psMemCheckPolynomial1D(NAME)) { \
+    psError(PS_ERR_BAD_PARAMETER_NULL, true, \
+            "Unallowable operation: argument %s is not a psPolynomial1D struct.\n",\
+            #NAME); \
+    return(RVAL); \
+} \
+
+#define PS_ASSERT_POLY_NON_NULL(NAME, RVAL) \
+if ((NAME) == NULL || (NAME)->coeff == NULL) { \
+    psError(PS_ERR_BAD_PARAMETER_NULL, true, \
+            "Unallowable operation: polynomial %s or its coeffs is NULL.", \
+            #NAME); \
+    return(RVAL); \
+} \
+
+#define PS_ASSERT_POLY_TYPE(NAME, TYPE, RVAL) \
+if ((NAME)->type != TYPE) { \
+    psError(PS_ERR_BAD_PARAMETER_TYPE, true, \
+            "Unallowable operation: polynomial %s has wrong type.", #NAME); \
+    return(RVAL); \
+} \
+
+#define PS_POLY_PRINT_1D(NAME) \
+printf("Poly %s: (nX) is (%d)\n", #NAME, NAME->nX);\
+for (psS32 i = 0 ; i < NAME->nX+1 ; i++) {\
+    printf("%s->coeff[%d] is %f\n", #NAME, i, NAME->coeff[i]); \
+}\
+
+#define PS_POLY_PRINT_2D(NAME) \
+printf("Poly %s: (nX, nY) is (%d, %d)\n", #NAME, NAME->nX, NAME->nY);\
+for (psS32 i = 0 ; i < NAME->nX+1 ; i++) {\
+    for (psS32 j = 0 ; j < NAME->nY+1 ; j++) {\
+        printf("%s->coeff[%d][%d] is %f\n", #NAME, i, j, NAME->coeff[i][j]); \
+    }\
+}\
 
 /** \} */ // End of MathGroup Functions
