summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-08-13 07:59:51 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-08-13 07:59:51 -0400
commit8bd1b2c460034a5b2b7c197f4abc334300f4ef90 (patch)
tree4f0e6e43137ec8f451bfcc7a30d9813ec90e7b69
parente022d317b81648fb1e0a1771385892a5aaddb324 (diff)
Fix rect-intersects?
-rw-r--r--2d/rect.scm4
1 files changed, 2 insertions, 2 deletions
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)))))