00001 /**************************************************/ 00002 //Multiply two 3x3 matrixs. This function developed by Jordi can be easily adapted to multiple n*n matrix's. (Pero me da flojera!). 00003 void Matrix_Multiply(float a[3][3], float b[3][3],float mat[3][3]) 00004 { 00005 float op[3]; 00006 for(int x=0; x<3; x++) 00007 { 00008 for(int y=0; y<3; y++) 00009 { 00010 for(int w=0; w<3; w++) 00011 { 00012 op[w]=a[x][w]*b[w][y]; 00013 } 00014 mat[x][y]=0; 00015 mat[x][y]=op[0]+op[1]+op[2]; 00016 00017 float test=mat[x][y]; 00018 } 00019 } 00020 } 00021 00022
1.7.0