Class: GeometryUtils
Defined in: utils/GeometryUtils.ts:4
Utility methods for rectangle and dimension geometry
Constructors
Constructor
new GeometryUtils():
GeometryUtils
Returns
GeometryUtils
Methods
boundingBox()
staticboundingBox(...rects):Rect|null
Defined in: utils/GeometryUtils.ts:11
Computes the union of multiple rectangles and returns the smallest rectangle that contains all of them
Parameters
rects
...Rect[]
The rectangles to compute the union of
Returns
Rect | null
The smallest rectangle that contains all the input rectangles, or null if no rectangles are provided
dimsEquals()
staticdimsEquals(a,b):boolean
Defined in: utils/GeometryUtils.ts:31
Checks if two dimensions are equal by comparing their width and height properties
Parameters
a
The first dimensions to compare
b
The second dimensions to compare
Returns
boolean
true if the dimensions are equal, false otherwise
rectEquals()
staticrectEquals(a,b):boolean
Defined in: utils/GeometryUtils.ts:42
Checks if two rectangles are equal by comparing their x, y, width, and height properties
Parameters
a
The first rectangle to compare
b
The second rectangle to compare
Returns
boolean
true if the rectangles are equal, false otherwise