summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-04-09 23:08:03 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-04-09 23:08:03 +0200
commitaad8e3cbc5dbf931fe88ea75050d413d39f7b37c (patch)
treee4fa08e179a2814980c9694c169de78d5a4fc2ad
parent1238cc5fe7c59e276c92e5c5935744501f659c44 (diff)
Use inexact numbers in divisions.
-rw-r--r--pict.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/pict.scm b/pict.scm
index ae9fe01..7939abe 100644
--- a/pict.scm
+++ b/pict.scm
@@ -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"