From cf69fb3440d59bddc9b37374330b12e1365a407c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 13 Nov 2020 22:26:14 -0500 Subject: math: rect: Fix rect-union and rect-clip. --- chickadee/math/rect.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chickadee/math/rect.scm b/chickadee/math/rect.scm index cd83e2e..8c80a75 100644 --- a/chickadee/math/rect.scm +++ b/chickadee/math/rect.scm @@ -332,15 +332,15 @@ same point." "Return a new rect that completely covers the area of RECT1 and RECT2." (with-new-rect rect - (rect-copy! rect2 rect1) - (rect-union! rect1 rect2))) + (rect-copy! rect1 rect) + (rect-union! rect rect2))) (define (rect-clip rect1 rect2) "Return a new rectangle that is the overlapping region of RECT1 and RECT2. If the rects do not overlap, a rect of size 0 is returned." (with-new-rect rect - (rect-copy! rect2 rect1) - (rect-clip! rect1 rect2))) + (rect-copy! rect1 rect) + (rect-clip! rect rect2))) ;;; -- cgit v1.2.3