(a: Rect, b: Rect)
| 4 | * 实现一个函数,判断 |
| 5 | */ |
| 6 | export function isRectIntersect(a: Rect, b: Rect) { |
| 7 | return ( |
| 8 | a.x < b.x + b.width && |
| 9 | a.x + a.width > b.x && |
| 10 | a.y < b.y + b.height && |
| 11 | a.y + a.height > b.y |
| 12 | ); |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * extendARect |
nothing calls this directly
no outgoing calls
no test coverage detected