concatInverse2D method

void concatInverse2D (Matrix matrix)

Implementation

void concatInverse2D(Matrix matrix) {
  var m00 = this.m00;
  var m10 = this.m10;
  var m20 = this.m20;
  var m30 = this.m30;
  var m01 = this.m01;
  var m11 = this.m11;
  var m21 = this.m21;
  var m31 = this.m31;
  var m03 = this.m03;
  var m13 = this.m13;
  var m23 = this.m23;
  var m33 = this.m33;

  num n00 = 0.0 + matrix.d / matrix.det;
  num n10 = 0.0 - matrix.c / matrix.det;
  num n30 = 0.0 - matrix.tx * n00 - matrix.ty * n10;
  num n01 = 0.0 - matrix.b / matrix.det;
  num n11 = 0.0 + matrix.a / matrix.det;
  num n31 = 0.0 - matrix.tx * n01 - matrix.ty * n11;

  _data[00] = m00 * n00 + m01 * n10 + m03 * n30;
  _data[01] = m10 * n00 + m11 * n10 + m13 * n30;
  _data[02] = m20 * n00 + m21 * n10 + m23 * n30;
  _data[03] = m30 * n00 + m31 * n10 + m33 * n30;
  _data[04] = m00 * n01 + m01 * n11 + m03 * n31;
  _data[05] = m10 * n01 + m11 * n11 + m13 * n31;
  _data[06] = m20 * n01 + m21 * n11 + m23 * n31;
  _data[07] = m30 * n01 + m31 * n11 + m33 * n31;
}