code: public static double det( DMatrix3x3 mat ) {
  
          double a = mat.a11*(mat.a22*mat.a33 - mat.a23*mat.a32);
          double b = mat.a12*(mat.a21*mat.a33 - mat.a23*mat.a31);
          double c = mat.a13*(mat.a21*mat.a32 - mat.a31*mat.a22);
  
          return a-b+c;
      }
docs: Computes the determinant using minor matrices.<br>
  WARNING: Potentially less stable than using LU decomposition.
  
  @param mat Input matrix.  Not modified.
  @return The determinant.