rapid-sdk
    Preparing search index...

    Function vecRotate

    • Rotate a vector counterclockwise around a pivot point

      Parameters

      • a: Vec2

        vector to rotate

      • angle: number

        angle in radians

      • around: Vec2

        pivot point

      Returns Vec2

      rotated vector

      vecRotate([1, 1], Math.PI, [0, 0]);   // returns [-1, -1]