From 34057231e45651a4e3d8ec1d11d958e6ea76653f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 15 Oct 2020 19:50:29 -0400 Subject: math: rect: Fix rect-inflate. --- chickadee/math/rect.scm | 5 +++-- 1 file 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 -- cgit v1.2.3