compose static method

void compose(
  1. Mat2D m,
  2. TransformComponents result
)

Implementation

static void compose(Mat2D m, TransformComponents result) {
  double r = result[4];

  if (r != 0.0) {
    Mat2D.fromRotation(m, r);
  } else {
    Mat2D.setIdentity(m);
  }
  m[4] = result[0];
  m[5] = result[1];
  Mat2D.scale(m, m, result.scale);

  double sk = result[5];
  if (sk != 0.0) {
    m[2] = m[0] * sk + m[2];
    m[3] = m[1] * sk + m[3];
  }
}