summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2016-06-29 09:34:04 +0000
committerapenner <penner@vaxxine.com>2016-06-29 09:34:04 +0000
commit0aca36171bd8c5c33823f839f594b8677d97c51d (patch)
treebac0b3dfc93588dcb3739265221887e814c860dd /src/2geom
parentFix bug#168286 also opem regression on bug#1594565 (diff)
downloadinkscape-0aca36171bd8c5c33823f839f594b8677d97c51d.tar.gz
inkscape-0aca36171bd8c5c33823f839f594b8677d97c51d.zip
avoid zero SBasis curve. (Bug 1593963)
Fixed bugs: - https://launchpad.net/bugs/1593963 (bzr r15003)
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/sbasis-geometric.cpp2
1 files changed, 1 insertions, 1 deletions
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<SBasis> 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<SBasis> 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<SBasis> >(D2<SBasis>(Linear(1),SBasis()));
SBasis x = V[0], y = V[1];