(box: Box)
| 66 | } |
| 67 | |
| 68 | function 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 | |
| 82 | export function rectIntersectsRect(rect1: Rect, rect2: Rect): boolean { |
| 83 | if ( |
no outgoing calls
no test coverage detected