aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/include/geom2d.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'svg-flatten/include/geom2d.hpp')
-rw-r--r--svg-flatten/include/geom2d.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/svg-flatten/include/geom2d.hpp b/svg-flatten/include/geom2d.hpp
index 34455cd..28ce024 100644
--- a/svg-flatten/include/geom2d.hpp
+++ b/svg-flatten/include/geom2d.hpp
@@ -180,10 +180,11 @@ namespace gerbolyze {
}
double imbalance = f_max / f_min - 1.0;
- //cerr << " * skew check: " << dbg_str();
+ bool okay = imbalance < rel_tol && (f_max - f_min)*fabs(dist_doc) < abs_tol;
+ //cerr << " " << (okay ? "." : "#") << " skew check: " << dbg_str();
//cerr << " imbalance=" << imbalance << endl;
//cerr << " rel=" << (imbalance < rel_tol) << " abs=" << (imbalance*fabs(dist_doc) < abs_tol) << endl;
- return imbalance < rel_tol && imbalance*fabs(dist_doc) < abs_tol;
+ return okay;
}
double doc2phys_min(double dist_doc) {