From 8bd1b2c460034a5b2b7c197f4abc334300f4ef90 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 13 Aug 2013 07:59:51 -0400 Subject: Fix rect-intersects? --- 2d/rect.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '2d') diff --git a/2d/rect.scm b/2d/rect.scm index e0a3e98..7169302 100644 --- a/2d/rect.scm +++ b/2d/rect.scm @@ -106,8 +106,8 @@ not overlap, a rect of size 0 is returned." (or (and (>= (rect-x rect2) (rect-x rect1)) (<= (rect-x rect2) (rect-x2 rect1))) (and (>= (rect-x2 rect2) (rect-x rect1)) - (<= (rect-x2 rect2) (rect-x2 rect1))) - (and (>= (rect-y rect2) (rect-y rect1)) + (<= (rect-x2 rect2) (rect-x2 rect1)))) + (or (and (>= (rect-y rect2) (rect-y rect1)) (<= (rect-y rect2) (rect-y2 rect1))) (and (>= (rect-y2 rect2) (rect-y rect1)) (<= (rect-y2 rect2) (rect-y2 rect1))))) -- cgit v1.2.3