transformed method

Vector2 transformed(
  1. Matrix3 matrix
)
inherited

Transforms this by matrix and returns the result.

Implementation

Vector2 transformed(Matrix3 matrix) => .new(
  (matrix[0] * x) + (matrix[3] * y) + matrix[6],
  (matrix[1] * x) + (matrix[4] * y) + matrix[7],
);