Skip to content

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

Rectangle.intersection() method

计算与另一个矩形的相交矩形

Signature:

typescript
intersection(other: Rectangle): Rectangle;

Parameters

Parameter

Type

Description

other

Rectangle

另一个矩形

Returns:

Rectangle

相交矩形,如果不相交返回空矩形

基于 MIT 许可证发布