prepend2D method

void prepend2D (Matrix matrix)

Implementation

void prepend2D(Matrix matrix) {
  var m00 = matrix.a;
  var m10 = matrix.c;
  var m30 = matrix.tx;
  var m01 = matrix.b;
  var m11 = matrix.d;
  var m31 = matrix.ty;

  var n00 = this.m00;
  var n10 = this.m10;
  var n30 = this.m30;
  var n01 = this.m01;
  var n11 = this.m11;
  var n31 = this.m31;
  var n02 = this.m02;
  var n12 = this.m12;
  var n32 = this.m32;
  var n03 = this.m03;
  var n13 = this.m13;
  var n33 = this.m33;

  _data[00] = m00 * n00 + m01 * n10;
  _data[01] = m10 * n00 + m11 * n10;
  _data[03] = m30 * n00 + m31 * n10 + n30;
  _data[04] = m00 * n01 + m01 * n11;
  _data[05] = m10 * n01 + m11 * n11;
  _data[07] = m30 * n01 + m31 * n11 + n31;
  _data[08] = m00 * n02 + m01 * n12;
  _data[09] = m10 * n02 + m11 * n12;
  _data[11] = m30 * n02 + m31 * n12 + n32;
  _data[12] = m00 * n03 + m01 * n13;
  _data[13] = m10 * n03 + m11 * n13;
  _data[15] = m30 * n03 + m31 * n13 + n33;
}