transform method

Vector2 transform(
  1. Vector2 arg
)

Transform arg of type Vector2 using the transformation defined by this.

Implementation

Vector2 transform(Vector2 arg) {
  final argStorage = arg._v2storage;
  final x = (_m2storage[0] * argStorage[0]) + (_m2storage[2] * argStorage[1]);
  final y = (_m2storage[1] * argStorage[0]) + (_m2storage[3] * argStorage[1]);
  argStorage[0] = x;
  argStorage[1] = y;
  return arg;
}