[#20446] mathutils: bugfix for matrix * matrix - patch by Paul Parchenko (parfoure) thanks

From the tracker:
- typo was making the multiplication to transpose resulting matrix
eg
####
from Mathutils import *
from math import radians

cont = GameLogic.getCurrentController()
owner = cont.owner

owner.worldOrientation = RotationMatrix(radians(1), 3, 'z') * owner.worldOrientation
####
This commit is contained in:
Dalai Felinto
2009-12-22 07:27:53 +00:00
parent 5bdcb2dff2
commit 9c22e846fe

View File

@@ -944,7 +944,7 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2)
for(z = 0; z < mat1->rowSize; z++) {
dot += (mat1->matrix[z][y] * mat2->matrix[x][z]);
}
mat[((x * mat1->colSize) + y)] = (float)dot;
mat[((y * mat1->rowSize) + x)] = (float)dot;
dot = 0.0f;
}
}