MCPcopy
hub / github.com/codeaashu/claude-code / unionRect

Function unionRect

src/ink/layout/geometry.ts:63–69  ·  view source on GitHub ↗
(a: Rectangle, b: Rectangle)

Source from the content-addressed store, hash-verified

61}
62
63export function unionRect(a: Rectangle, b: Rectangle): Rectangle {
64 const minX = Math.min(a.x, b.x)
65 const minY = Math.min(a.y, b.y)
66 const maxX = Math.max(a.x + a.width, b.x + b.width)
67 const maxY = Math.max(a.y + a.height, b.y + b.height)
68 return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }
69}
70
71export function clampRect(rect: Rectangle, size: Size): Rectangle {
72 const minX = Math.max(0, rect.x)

Callers 5

getMethod · 0.85
setCellStyleIdFunction · 0.85
blitRegionFunction · 0.85
clearRegionFunction · 0.85
diffEachFunction · 0.85

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected