translate method

Matrix3 translate(
  1. double tx,
  2. double ty
)

Translates this matrix by the given scalar values.

Implementation

Matrix3 translate(double tx, double ty) {
  final te = storage;

  te[0] += tx * te[2];
  te[3] += tx * te[5];
  te[6] += tx * te[8];
  te[1] += ty * te[2];
  te[4] += ty * te[5];
  te[7] += ty * te[8];

  return this;
}