From 1c95c269f2bbbd3e54cc0b6b4097e812d0748c3e Mon Sep 17 00:00:00 2001 From: JF Barraud Date: Wed, 30 Jan 2008 22:59:31 +0000 Subject: fixed a bug in sqrt(pwsb). (bzr r4623) --- src/2geom/sbasis-math.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3