MCPcopy Create free account
hub / github.com/react/react / boxToRect

Function boxToRect

packages/react-devtools-timeline/src/view-base/geometry.js:68–80  ·  view source on GitHub ↗
(box: Box)

Source from the content-addressed store, hash-verified

66}
67
68function boxToRect(box: Box): Rect {
69 const [top, right, bottom, left] = box;
70 return {
71 origin: {
72 x: left,
73 y: top,
74 },
75 size: {
76 width: right - left,
77 height: bottom - top,
78 },
79 };
80}
81
82export function rectIntersectsRect(rect1: Rect, rect2: Rect): boolean {
83 if (

Callers 2

intersectionOfRectsFunction · 0.85
unionOfRectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected