Fixed error: attempt to divide by (void) when axis bounds' length is a multiple of 1000

Please merge into 5.2
This commit is contained in:
Neil Toronto 2011-10-10 13:26:30 -06:00
parent 90304687f1
commit a0e2401cbe
2 changed files with 5 additions and 3 deletions

View File

@ -31,7 +31,7 @@
(define step (let ([y (/ (- x-max x-min) mag)])
(cond [(y . < . 2) (* 1/5 mag)]
[(y . < . 5) (* 1/2 mag)]
[(y . < . 10) mag])))
[else mag])))
(define start (* (ceiling (/ x-min step)) step))
(define stop (* (floor (/ x-max step)) step))
(define num (+ 1 (round (/ (- stop start) step))))

View File

@ -11,6 +11,8 @@
(plot empty #:x-min -1 #:x-max 1 #:y-min -1 #:y-max 1)
(time (plot (function values 0 1000)))
(parameterize ([plot-background "black"]
[plot-foreground "white"]
[plot-background-alpha 1/2]