public static void invert(double src[][], double dst[][]) {
      gaussian(src, a);

      for (int i = 0 ; i < 4 ; i++)
      for (int j = 0 ; j < 4 ; j++)
          b[i][i] = i == j ? 1 : 0;

      for (int i = 0 ; i < 3 ; i++)
         for (int j = i + 1 ; j < 4 ; j++)
            for (int k = 0 ; k < 4 ; k++)
               b[index[j]][k] -= a[index[j]][i] * b[index[i]][k];

      for (int i = 0 ; i < 4 ; i++) {
         dst[4-1][i] = b[index[4-1]][i] / a[index[4-1]][4-1];
         for (int j = 2 ; j >= 0 ; j--) {
            dst[j][i] = b[index[j]][i];
            for (int k = j + 1 ; k < 4 ; k++)
               dst[j][i] -= a[index[j]][k] * dst[k][i];
            dst[j][i] /= a[index[j]][j];
         }
      }
   }