Skip to content
On this page

Home > @taiyuuki/utils > Vec2 > (constructor)

Vec2.(constructor)

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

类 Vec2 的构造函数,用于初始化 x 和 y 坐标。

Signature:

typescript
constructor(x: number, y?: number);
constructor(x: number, y?: number);

Parameters

ParameterTypeDescription
xnumberx坐标
ynumber(Optional) y坐标

Released under the MIT License.