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:
parent
90304687f1
commit
a0e2401cbe
|
@ -31,7 +31,7 @@
|
||||||
(define step (let ([y (/ (- x-max x-min) mag)])
|
(define step (let ([y (/ (- x-max x-min) mag)])
|
||||||
(cond [(y . < . 2) (* 1/5 mag)]
|
(cond [(y . < . 2) (* 1/5 mag)]
|
||||||
[(y . < . 5) (* 1/2 mag)]
|
[(y . < . 5) (* 1/2 mag)]
|
||||||
[(y . < . 10) mag])))
|
[else mag])))
|
||||||
(define start (* (ceiling (/ x-min step)) step))
|
(define start (* (ceiling (/ x-min step)) step))
|
||||||
(define stop (* (floor (/ x-max step)) step))
|
(define stop (* (floor (/ x-max step)) step))
|
||||||
(define num (+ 1 (round (/ (- stop start) step))))
|
(define num (+ 1 (round (/ (- stop start) step))))
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
(plot empty #:x-min -1 #:x-max 1 #:y-min -1 #:y-max 1)
|
(plot empty #:x-min -1 #:x-max 1 #:y-min -1 #:y-max 1)
|
||||||
|
|
||||||
|
(time (plot (function values 0 1000)))
|
||||||
|
|
||||||
(parameterize ([plot-background "black"]
|
(parameterize ([plot-background "black"]
|
||||||
[plot-foreground "white"]
|
[plot-foreground "white"]
|
||||||
[plot-background-alpha 1/2]
|
[plot-background-alpha 1/2]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user