translate static method

Matrix4 translate(
  1. Offset translation
)

Creates a translation matrix

Implementation

static Matrix4 translate(Offset translation) {
  return Matrix4(
    1,
    0,
    0,
    0,
    0,
    1,
    0,
    0,
    0,
    0,
    1,
    0,
    translation.dx,
    translation.dy,
    0,
    1,
  );
}