summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-10-15 19:50:29 -0400
committerDavid Thompson <dthompson2@worcester.edu>2020-10-15 19:50:44 -0400
commit34057231e45651a4e3d8ec1d11d958e6ea76653f (patch)
treea4453d6bedb44d05e5f04f71c5ab2d84e30eae7e
parentf457d4292c7cc2ebb762f49828a70641e40df590 (diff)
math: rect: Fix rect-inflate.
-rw-r--r--chickadee/math/rect.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/chickadee/math/rect.scm b/chickadee/math/rect.scm
index 84e743d..cd83e2e 100644
--- a/chickadee/math/rect.scm
+++ b/chickadee/math/rect.scm
@@ -324,8 +324,9 @@ its current location."
"Return a new rect based on RECT but grown by WIDTH on the x axis
and HEIGHT on the y axis while keeping the rect centered around the
same point."
- (with-new-rect rect
- (rect-inflate! rect width height)))
+ (with-new-rect new
+ (rect-copy! rect new)
+ (rect-inflate! new width height)))
(define (rect-union rect1 rect2)
"Return a new rect that completely covers the area of RECT1 and