Rotate a vector by an angle in radians (counter-clockwise in standard math coords).
import { degToRad } from './math';const rotated = vec2Rotate(vec2(1, 0), degToRad(90)); // ≈ { x: 0, y: 1 } Copy
import { degToRad } from './math';const rotated = vec2Rotate(vec2(1, 0), degToRad(90)); // ≈ { x: 0, y: 1 }
Rotate a vector by an angle in radians (counter-clockwise in standard math coords).