diff options
author | David Thompson <dthompson2@worcester.edu> | 2016-01-01 16:31:52 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2016-01-01 16:31:52 -0500 |
commit | adb9012f74eaef7ae0daeaef70f6b6ff3bcce0c1 (patch) | |
tree | 2335f457a503d5f00a081185537496aacc48db48 | |
parent | 1e312d8fcc2f237c01b90fc70880140d73c1e2ae (diff) |
math: rect: Fix rect-inflate implementation.
* sly/math/rect.scm (%rect-inflate): Subtract, not add, the half width.
D'oh!
-rw-r--r-- | sly/math/rect.scm | 4 |
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))) |