Bézier curves/Intersections: Difference between revisions

Content added Content deleted
(Assume the C definition of epsilon.)
(→‎{{header|Scheme}}: Assume the C definition of epsilon.)
Line 3,925: Line 3,925:


(define *absolute-tolerance*
(define *absolute-tolerance*
(make-parameter (* 100 fl-epsilon) check-absolute-tolerance))
(make-parameter (* 50 fl-epsilon) check-absolute-tolerance))


(define (compare-lengths norm ax ay bx by)
(define (compare-lengths norm ax ay bx by)
Line 4,088: Line 4,088:
;; I do not know this test is any better, for THIS algorithm,
;; I do not know this test is any better, for THIS algorithm,
;; than an exact equality test. But it is no worse.
;; than an exact equality test. But it is no worse.
(<= (abs (- x y)) (* fl-epsilon (max (abs x) (abs y)))))
(<= (abs (- x y)) (* 0.5 fl-epsilon (max (abs x) (abs y)))))


(define (include-params tp tq lst)
(define (include-params tp tq lst)