copyFromAndConcat2D method Null safety

void copyFromAndConcat2D(
  1. Matrix3D copyMatrix,
  2. Matrix concatMatrix
)

Implementation

void copyFromAndConcat2D(Matrix3D copyMatrix, Matrix concatMatrix) {
  final m00 = copyMatrix.m00;
  final m10 = copyMatrix.m10;
  final m20 = copyMatrix.m20;
  final m30 = copyMatrix.m30;
  final m01 = copyMatrix.m01;
  final m11 = copyMatrix.m11;
  final m21 = copyMatrix.m21;
  final m31 = copyMatrix.m31;
  final m02 = copyMatrix.m02;
  final m12 = copyMatrix.m12;
  final m22 = copyMatrix.m22;
  final m32 = copyMatrix.m32;
  final m03 = copyMatrix.m03;
  final m13 = copyMatrix.m13;
  final m23 = copyMatrix.m23;
  final m33 = copyMatrix.m33;

  final n00 = concatMatrix.a;
  final n10 = concatMatrix.c;
  final n30 = concatMatrix.tx;
  final n01 = concatMatrix.b;
  final n11 = concatMatrix.d;
  final n31 = concatMatrix.ty;

  _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;
  _data[08] = m02;
  _data[09] = m12;
  _data[10] = m22;
  _data[11] = m32;
  _data[12] = m03;
  _data[13] = m13;
  _data[14] = m23;
  _data[15] = m33;
}