From a853b0206541954a75bf7e25088a45c035b5d24b Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Sat, 4 Mar 2017 08:24:35 -0500 Subject: re-commit rev 15003. (Bug 1668853) Fixed bugs: - https://launchpad.net/bugs/1668853 (bzr r15563) --- src/2geom/sbasis-geometric.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/2geom/sbasis-geometric.cpp') diff --git a/src/2geom/sbasis-geometric.cpp b/src/2geom/sbasis-geometric.cpp index 19eccc451..3fe27748e 100644 --- a/src/2geom/sbasis-geometric.cpp +++ b/src/2geom/sbasis-geometric.cpp @@ -227,7 +227,7 @@ Geom::unitVector(D2 const &V_in, double tol, unsigned order){ // -This approach is numerically bad. Find a stable way to rescale V_in to have non vanishing ends. // -This done, unitVector will have jumps at zeros: fill the gaps with arcs of circles. D2 V = RescaleForNonVanishingEnds(V_in); - if (V[0].isZero(0) && V[1].isZero(0)) + if (V[0].isZero(tol) && V[1].isZero(tol)) return Piecewise >(D2(Linear(1),SBasis())); SBasis x = V[0], y = V[1]; -- cgit v1.2.3