concatInverse2D method Null safety

void concatInverse2D(
  1. Matrix matrix
)

Implementation

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

  final num n00 = 0.0 + matrix.d / matrix.det;
  final num n10 = 0.0 - matrix.c / matrix.det;
  final num n30 = 0.0 - matrix.tx * n00 - matrix.ty * n10;
  final num n01 = 0.0 - matrix.b / matrix.det;
  final num n11 = 0.0 + matrix.a / matrix.det;
  final 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;
}