Beispiel #1
0
 public CSMatrix Mul(CSMatrix mat)
 {
     float[] res = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
     for (int i = 0; i < 4; ++i)
     {
         for (int j = 0; j < 4; ++j)
         {
             for (int k = 0; k < 4; ++k)
             {
                 res[4 * j + i] += this[i, k] * mat[k, j];
             }
         }
     }
     return(new CSMatrix(res));
 }
Beispiel #2
0
        public CSMatrix Mul(CSMatrix mat)
        {
			float[] res = new float[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
            for(int i = 0; i < 4; ++i) {
                for(int j = 0; j < 4; ++j) {
                    for(int k = 0; k < 4; ++k) {
                        res[4 * j + i] += this[i, k] * mat[k, j];
                    }
                }
            }
            return new CSMatrix(res);
        }