Skip to main content

vec2()

function vec2(x: number, y: number): Vector2;

Defined in: src/lib/math.ts:724

Creates a 2D vector from coordinates.

Parameters

ParameterTypeDescription
xnumberThe x coordinate.
ynumberThe y coordinate.

Returns

Vector2

A new Vector2 instance.