summaryrefslogtreecommitdiff
path: root/sly/math
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-01-01 16:31:52 -0500
committerDavid Thompson <dthompson2@worcester.edu>2016-01-01 16:31:52 -0500
commitadb9012f74eaef7ae0daeaef70f6b6ff3bcce0c1 (patch)
tree2335f457a503d5f00a081185537496aacc48db48 /sly/math
parent1e312d8fcc2f237c01b90fc70880140d73c1e2ae (diff)
math: rect: Fix rect-inflate implementation.
* sly/math/rect.scm (%rect-inflate): Subtract, not add, the half width. D'oh!
Diffstat (limited to 'sly/math')
-rw-r--r--sly/math/rect.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/sly/math/rect.scm b/sly/math/rect.scm
index 856842b..07358f6 100644
--- a/sly/math/rect.scm
+++ b/sly/math/rect.scm
@@ -154,8 +154,8 @@ arguments."
(define (%rect-inflate rect width height)
"Grows the rect by the given amount. The rect stays centered around
its current center."
- (make-rect (+ (rect-x rect) (/ width 2))
- (+ (rect-y rect) (/ height 2))
+ (make-rect (- (rect-x rect) (/ width 2))
+ (- (rect-y rect) (/ height 2))
(+ (rect-width rect) width)
(+ (rect-height rect) height)))