intersects
ts
function Rect.intersects(a: Rect, b: Rect): booleanChecks if two rectangles intersect or overlap with each other.
Example
ts
Rect.intersects(
{ left: 0, top: 0, width: 50, height: 50 },
{ left: 25, top: 25, width: 50, height: 50 },
);
// truets
pipe(
{ left: 0, top: 0, width: 50, height: 50 },
Rect.intersects({ left: 25, top: 25, width: 50, height: 50 }),
);
// true