diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-30 10:05:21 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-30 10:05:21 -0500 |
commit | 749a5a306deacd5c481ecc4c53b7f03178c3e335 (patch) | |
tree | bdfef3b82a72dbfbea85ff013013362ef3baf75d /src/core | |
parent | 98b5811d8b50d20f8c15e9b202f0d3f0457df58b (diff) |
[add] button unit and [example]; [modify] scale-by is now defun
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/affine.lisp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/affine.lisp b/src/core/affine.lisp index 4585a81..7c87d16 100644 --- a/src/core/affine.lisp +++ b/src/core/affine.lisp @@ -17,10 +17,10 @@ -(defmethod scale-by ((affine affine) amount) - (with-slots (scale-x scale-y) affine - (setf scale-x (* amount scale-x) - scale-y (* amount scale-y)))) +(defun scale-by (affine amount) + (with-accessors ((sx scale-x) (sy scale-y)) affine + (setf sx (* amount sx) + sy (* amount sy)))) (defun set-width-preserve-aspect (affine new-width) (scale-by affine (/ new-width (width affine)))) |