translate function

List<num> translate(
  1. List<num> m,
  2. num tx,
  3. num ty
)

Multiplies by a 2D translation matrix m the matrix to be multiplied tx amount to translate in x ty amount to translate in y

Implementation

List<num> translate(List<num> m, num tx, num ty) {
  return multiply(m, translation(tx, ty));
}