diff options
| author | mrmr1993 | 2017-07-04 12:46:42 +0100 |
|---|---|---|
| committer | mrmr1993 | 2017-11-01 07:46:22 +0000 |
| commit | e424bb942b58e5cee3506e42b6f3aa9008eb7b17 (patch) | |
| tree | 6e39bb954d67bf486db385562f5a3307916fa243 /lib | |
| parent | 8cd39d357b129e40b1e3a8fc99910bf4c76747c0 (diff) | |
| download | vimium-e424bb942b58e5cee3506e42b6f3aa9008eb7b17.tar.bz2 | |
Rename Rect.contains to Rect.intersects, add an explanitory comment
Diffstat (limited to 'lib')
| -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 |
