Skip to content

aninest root / Vec2 / rotate

rotate()

ts
function rotate(v, angle): Vec2

Rotates a vector by an angle in radians.

Parameters

v: Vec2

angle: number

The angle to rotate the vector by in radians.

Returns

Vec2

A new vector.

Defined in

Utils/vec2.ts:164