apply method

Vec2D apply(
  1. Mat2D m
)

Implementation

Vec2D apply(Mat2D m) {
  final newX = x * m[0] + y * m[2] + m[4];
  final newY = x * m[1] + y * m[3] + m[5];
  x = newX;
  y = newY;
  // ignore: avoid_returning_this
  return this;
}