(rect: Rect)
| 58 | } |
| 59 | |
| 60 | function rectToBox(rect: Rect): Box { |
| 61 | const top = rect.origin.y; |
| 62 | const right = rect.origin.x + rect.size.width; |
| 63 | const bottom = rect.origin.y + rect.size.height; |
| 64 | const left = rect.origin.x; |
| 65 | return [top, right, bottom, left]; |
| 66 | } |
| 67 | |
| 68 | function boxToRect(box: Box): Rect { |
| 69 | const [top, right, bottom, left] = box; |
no outgoing calls
no test coverage detected