updateTransform method

void updateTransform()

Implementation

void updateTransform() {
  if (rotation != 0) {
    Mat2D.fromRotation(transform, rotation);
  } else {
    Mat2D.setIdentity(transform);
  }
  transform[4] = x;
  transform[5] = y;

  Mat2D.scaleByValues(transform, scaleX, scaleY);
}