Home > @esengine/ecs-framework-monorepo > Vector2 > (constructor)
Vector2.(constructor)
创建2D向量
Signature:
typescript
constructor(x?: number, y?: number);
Parameters
Parameter | Type | Description |
---|---|---|
x | number | (Optional) X分量,默认为0 |
y | number | (Optional) Y分量,默认为0 |