From 4be3ce9901d4c740064946611959dafdcdaec45e Mon Sep 17 00:00:00 2001 From: Zach Beane Date: Tue, 14 Oct 2014 19:46:08 -0400 Subject: [PATCH] Fix up ellipse arc approximation. The previous version could blow the stack. --- arc.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc.lisp b/arc.lisp index f74feee..6291c5d 100644 --- a/arc.lisp +++ b/arc.lisp @@ -132,7 +132,7 @@ (cond ((< eta2 eta1) (error "approximate-arc: eta2 must be bigger than eta1")) ((> eta2 (+ eta1 (/ pi 2) (* eta2 long-float-epsilon))) - (let ((etamid (+ eta1 (/ pi 2)))) + (let ((etamid (+ eta1 (/ pi 2) (* eta2 long-float-epsilon)))) (nconc (approximate-arc cx cy a b theta eta1 etamid err) (approximate-arc cx cy a b theta etamid eta2 err))))