absoluteRotated method

Vector2 absoluteRotated(
  1. Matrix3 matrix
)
inherited

Rotates this by the absolute rotation of the upper-left 2x2 of matrix, ignoring translation, and returns the result. Primarily used by AABB transformation code.

Implementation

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