Source
void copyFrom2DAndConcat(Matrix copyMatrix, Matrix3D concatMatrix) {
var m00 = copyMatrix.a;
var m10 = copyMatrix.c;
var m30 = copyMatrix.tx;
var m01 = copyMatrix.b;
var m11 = copyMatrix.d;
var m31 = copyMatrix.ty;
var n00 = concatMatrix.m00;
var n10 = concatMatrix.m10;
var n20 = concatMatrix.m20;
var n30 = concatMatrix.m30;
var n01 = concatMatrix.m01;
var n11 = concatMatrix.m11;
var n21 = concatMatrix.m21;
var n31 = concatMatrix.m31;
var n02 = concatMatrix.m02;
var n12 = concatMatrix.m12;
var n22 = concatMatrix.m22;
var n32 = concatMatrix.m32;
var n03 = concatMatrix.m03;
var n13 = concatMatrix.m13;
var n23 = concatMatrix.m23;
var n33 = concatMatrix.m33;
_data[00] = m00 * n00 + m01 * n10;
_data[01] = m10 * n00 + m11 * n10;
_data[02] = n20;
_data[03] = m30 * n00 + m31 * n10 + n30;
_data[04] = m00 * n01 + m01 * n11;
_data[05] = m10 * n01 + m11 * n11;
_data[06] = n21;
_data[07] = m30 * n01 + m31 * n11 + n31;
_data[08] = m00 * n02 + m01 * n12;
_data[09] = m10 * n02 + m11 * n12;
_data[10] = n22;
_data[11] = m30 * n02 + m31 * n12 + n32;
_data[12] = m00 * n03 + m01 * n13;
_data[13] = m10 * n03 + m11 * n13;
_data[14] = n23;
_data[15] = m30 * n03 + m31 * n13 + n33;
}