Skip to content

Home > @esengine/ecs-framework-monorepo > Rectangle > fromPoints

Rectangle.fromPoints() method

从两个点创建矩形

Signature:

typescript
static fromPoints(point1: Vector2, point2: Vector2): Rectangle;

Parameters

Parameter

Type

Description

point1

Vector2

第一个点

point2

Vector2

第二个点

Returns:

Rectangle

新的矩形实例

基于 MIT 许可证发布