| 239 | } |
| 240 | |
| 241 | bool WorldGeometry::rectIntersectsRect(RectF const& rect1, RectF const& rect2) const { |
| 242 | for (auto const& r1 : splitRect(rect1)) { |
| 243 | for (auto const& r2 : splitRect(rect2)) { |
| 244 | if (r1.intersects(r2)) |
| 245 | return true; |
| 246 | } |
| 247 | } |
| 248 | return false; |
| 249 | } |
| 250 | |
| 251 | RectF WorldGeometry::rectOverlap(RectF const& rect1, RectF const& rect2) const { |
| 252 | return rect1.overlap(RectF::withSize(nearestTo(rect1.min(), rect2.min()), rect2.size())); |
no test coverage detected