From 61d70ae04c80b615dea1605a3716062460cd0148 Mon Sep 17 00:00:00 2001 From: jfbarraud Date: Wed, 30 Jan 2008 22:59:31 +0000 Subject: [PATCH] fixed a bug in sqrt(pwsb). --- src/2geom/sbasis-math.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/2geom/sbasis-math.cpp b/src/2geom/sbasis-math.cpp index 0140862b5..08647959a 100644 --- a/src/2geom/sbasis-math.cpp +++ b/src/2geom/sbasis-math.cpp @@ -145,7 +145,9 @@ Piecewise sqrt(SBasis const &f, double tol, int order){ Piecewise sqrt(Piecewise const &f, double tol, int order){ Piecewise result; - Piecewise ff=max(f,Linear(tol*tol)); + Piecewise zero = Piecewise(Linear(tol*tol)); + zero.setDomain(f.domain()); + Piecewise ff=max(f,zero); for (unsigned i=0; i sqrtfi = sqrt_internal(ff.segs[i],tol,order); -- 2.30.2