diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-04-09 23:08:03 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-04-09 23:08:03 +0200 |
commit | aad8e3cbc5dbf931fe88ea75050d413d39f7b37c (patch) | |
tree | e4fa08e179a2814980c9694c169de78d5a4fc2ad | |
parent | 1238cc5fe7c59e276c92e5c5935744501f659c44 (diff) |
Use inexact numbers in divisions.
-rw-r--r-- | pict.scm | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -286,8 +286,8 @@ strings that are built from the list of attributes LST." (define (compute-modifiers inner) (let* ((width (pict-width inner)) (height (pict-height inner)) - (cx (/ width 2)) - (cy (/ height 2)) + (cx (exact->inexact (/ width 2))) + (cy (exact->inexact (/ height 2))) (vecx (make-rectangular width 0)) (vecy (make-rectangular 0 height)) (degs (+ deg @@ -304,8 +304,8 @@ strings that are built from the list of attributes LST." (compose (transform-modifier "translate" (const (format #f "~a ~a" - (/ (- new-width width) 2) - (/ (- new-height height) 2)))) + (exact->inexact (/ (- new-width width) 2)) + (exact->inexact (/ (- new-height height) 2))))) (transform-modifier "rotate" (const (format #f "~a ~a ~a" |