RPE Chart Utils
    Preparing search index...

    Function vec2Rotate

    • Rotate a vector by an angle in radians (counter-clockwise in standard math coords).

      Parameters

      • v: Vec2
      • angle: number

      Returns Vec2

      import { degToRad } from './math';
      const rotated = vec2Rotate(vec2(1, 0), degToRad(90)); // ≈ { x: 0, y: 1 }