diff options
Diffstat (limited to 'lib/rect.coffee')
| -rw-r--r-- | lib/rect.coffee | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rect.coffee b/lib/rect.coffee index fdeace25..703c640c 100644 --- a/lib/rect.coffee +++ b/lib/rect.coffee @@ -67,7 +67,8 @@ Rect = rects.filter (rect) -> rect.height > 0 and rect.width > 0 - contains: (rect1, rect2) -> + # Determine whether two rects overlap. + intersects: (rect1, rect2) -> rect1.right > rect2.left and rect1.left < rect2.right and rect1.bottom > rect2.top and |
