linearly v0.32.0Docs


linearly v0.32.0 / vec2 / rotate90

Function: rotate90()

rotate90(a, sweep, origin?): vec2

Rotates a vector by 90 degrees

Parameters

a: vec2

the vector to rotate

sweep: boolean = true

If true, the rotation is in positive direction. For example, it means clockwise rotation in a Y-down coordinate system.

origin?: vec2

The origin of the rotation

Returns

vec2

The rotated vector

Defined in

src/vec2.ts:591open in new window