copyFromAndConcat method

void copyFromAndConcat(
  1. Matrix copyMatrix,
  2. Matrix concatMatrix
)

Implementation

void copyFromAndConcat(Matrix copyMatrix, Matrix concatMatrix) {
  final a1 = copyMatrix.a;
  final b1 = copyMatrix.b;
  final c1 = copyMatrix.c;
  final d1 = copyMatrix.d;
  final tx1 = copyMatrix.tx;
  final ty1 = copyMatrix.ty;

  final a2 = concatMatrix.a;
  final b2 = concatMatrix.b;
  final c2 = concatMatrix.c;
  final d2 = concatMatrix.d;
  final tx2 = concatMatrix.tx;
  final ty2 = concatMatrix.ty;

  _data[0] = a1 * a2 + b1 * c2;
  _data[1] = a1 * b2 + b1 * d2;
  _data[2] = c1 * a2 + d1 * c2;
  _data[3] = c1 * b2 + d1 * d2;
  _data[4] = tx1 * a2 + ty1 * c2 + tx2;
  _data[5] = tx1 * b2 + ty1 * d2 + ty2;
}