#include #include "matrix.h" /****************************************************************/ /* */ /* DAVID COLE ME171 - matrix.h matrix.c */ /* 3/23/89 */ /* */ /* Repaired by Stephen Heise 3/15/93 */ /* Updated by Michael Scott 4/14/97 */ /* */ /****************************************************************/ /************************************************/ /* */ /* matrix.c */ /* */ /* A file for assorted matrix operations. */ /* Functions are declared in matrix.h */ /* Note N = 4 (homogeneous transformations */ /* */ /************************************************/ int invert_matrix (double mat[N][N],double inv[N][N]) /*** Returns a value of 1 if mat is invertable. ***/ /*** Returns a value of 0 if mat is not invertable. ***/ /*** inv exits this function as the inverse of mat ***/ /*** mat exits this function as the identity matrix ***/ /*** N is #defined to be 4***/ { double m,temp[N][N]; int i,j,col,finder; for (i=0; i