Skip to content

aninest-root / Vec2 / rotateAround

rotateAround()

ts
function rotateAround(
   v, 
   pivot, 
   angle): Vec2;

Defined in: Utils/vec2.ts:178

Rotates a vector around a pivot point by an angle in radians.

Parameters

v

Vec2

The vector to rotate.

pivot

Vec2

The point to rotate the vector around.

angle

number

The angle to rotate the vector by in radians.

Returns

Vec2

A new vector.