Files
esengine/source/src/Utils/RectangleExt.ts

7 lines
290 B
TypeScript
Raw Normal View History

2020-06-16 11:59:40 +08:00
class RectangleExt {
2020-07-08 15:15:15 +08:00
public static union(first: Rectangle, point: Vector2){
2020-06-16 11:59:40 +08:00
let rect = new Rectangle(point.x, point.y, 0, 0);
2020-07-09 14:16:10 +08:00
let rectResult = first.union(rect);
return new Rectangle(rectResult.x, rectResult.y, rectResult.width, rectResult.height);
2020-06-16 11:59:40 +08:00
}
}