fix rotate so that it can accept non-integral arguments
closes PR 12632
This commit is contained in:
parent
74ca931f5a
commit
1b0df5d48d
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user