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
Parameter | Type | Description |
---|---|---|
x | number | x坐标 |
y | number | (Optional) y坐标 |