Skip to content

Home > @esengine/ecs-framework-monorepo > Vector2 > clamp

Vector2.clamp() method

限制向量分量

Signature:

typescript
clamp(min: Vector2, max: Vector2): this;

Parameters

Parameter

Type

Description

min

Vector2

最小值向量

max

Vector2

最大值向量

Returns:

this

当前向量实例(链式调用)

基于 MIT 许可证发布