fix rotate so that it can accept non-integral arguments

closes PR 12632
This commit is contained in:
Robby Findler 2012-03-21 19:45:00 -05:00
parent 74ca931f5a
commit 1b0df5d48d
2 changed files with 6 additions and 1 deletions

View File

@ -754,7 +754,7 @@
(unless (and (<= 0 θ)
(< θ 360))
(error 'degrees->complex "~s" θ))
(case (modulo θ 360)
(case (and (integer? θ) (modulo θ 360))
[(0) 1+0i]
[(90) 0+1i]
[(180) -1+0i]

View File

@ -886,6 +886,11 @@
=>
#t)
;; make sure rotate can get non-integral arguments
(test (rotate -90.5 (rotate 90.5 (rectangle 20 100 'solid 'orange)))
=>
(rectangle 20 100 'solid 'orange))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; scaling tests