Index: trunk/psLib/src/dataManip/psMatrix.c
===================================================================
--- trunk/psLib/src/dataManip/psMatrix.c	(revision 4321)
+++ trunk/psLib/src/dataManip/psMatrix.c	(revision 4385)
@@ -21,6 +21,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-20 22:42:29 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-25 00:51:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -298,5 +298,5 @@
 }
 
-psImage* psMatrixInvert(psImage* outImage, const psImage* inImage, float *det)
+psImage* psMatrixInvert(psImage* out, const psImage* in, float *determinant)
 {
     psS32 signum = 0;
@@ -307,20 +307,20 @@
     gsl_permutation *perm = NULL;
 
-    #define INVERT_CLEANUP { psFree(outImage); return NULL; }
-    // Error checks
-    PS_ASSERT_GENERAL_PTR_NON_NULL(det, INVERT_CLEANUP);
-    PS_ASSERT_GENERAL_IMAGE_NON_NULL(inImage, INVERT_CLEANUP);
-    PS_CHECK_POINTERS(inImage, outImage, INVERT_CLEANUP);
-    PS_CHECK_DIMEN_AND_TYPE(inImage, PS_DIMEN_IMAGE, INVERT_CLEANUP);
-    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(inImage, INVERT_CLEANUP);
-
-    outImage = psImageRecycle(outImage, inImage->numCols, inImage->numRows, inImage->type.type);
-
-    PS_CHECK_SQUARE(inImage, INVERT_CLEANUP);
-    PS_CHECK_SQUARE(outImage, INVERT_CLEANUP);
+    #define INVERT_CLEANUP { psFree(out); return NULL; }
+    // Error checks
+    PS_ASSERT_GENERAL_PTR_NON_NULL(determinant, INVERT_CLEANUP);
+    PS_ASSERT_GENERAL_IMAGE_NON_NULL(in, INVERT_CLEANUP);
+    PS_CHECK_POINTERS(in, out, INVERT_CLEANUP);
+    PS_CHECK_DIMEN_AND_TYPE(in, PS_DIMEN_IMAGE, INVERT_CLEANUP);
+    PS_ASSERT_GENERAL_IMAGE_NON_EMPTY(in, INVERT_CLEANUP);
+
+    out = psImageRecycle(out, in->numCols, in->numRows, in->type.type);
+
+    PS_CHECK_SQUARE(in, INVERT_CLEANUP);
+    PS_CHECK_SQUARE(out, INVERT_CLEANUP);
 
     // Initialize data
-    numRows = inImage->numRows;
-    numCols = inImage->numCols;
+    numRows = in->numRows;
+    numCols = in->numCols;
 
     // Initialize GSL data
@@ -328,13 +328,13 @@
     lu = gsl_matrix_alloc(numRows, numCols);
     inv = gsl_matrix_alloc(numRows, numCols);
-    psImageToGslMatrix(lu, inImage);
+    psImageToGslMatrix(lu, in);
 
     // Invert data and calculate determinant
     gsl_linalg_LU_decomp(lu, perm, &signum);
     gsl_linalg_LU_invert(lu, perm, inv);
-    *det = (float)gsl_linalg_LU_det(lu, signum);
+    *determinant = (float)gsl_linalg_LU_det(lu, signum);
 
     // Copy GSL matrix data to psImage data
-    gslMatrixToPsImage(outImage, inv);
+    gslMatrixToPsImage(out, inv);
 
     // Free GSL structs
@@ -343,5 +343,5 @@
     gsl_matrix_free(inv);
 
-    return outImage;
+    return out;
 }
 
