I want to multiply 2 matrices with the gl-matrix.js library gl matrix mat4
The multiplication does work f.e. this :
var testMat = mat4.create();
mat4.multiply(testMat, this._transformations[0].transformation, this._transformation.transformation);
Where this._transformation[x].transformation
is a matrix.
But it doesnt work when doing this :
mat4.multiply(this._transformations[0].transformation, this._transformations[0].transformation, this._transformation.transformation);
Which means the matrix stored in this._transformations[0]
is still the same after the multiplication.
Has someone an explanation for this or can tell me what i am doing wrong?
Edit : console.log(mat4.equals(mat4.create(),this._transformations[0].transformation))
returns true