aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2021-05-24 20:50:53 +0200
committerjaseg <git-bigdata-wsl-arch@jaseg.de>2021-05-24 20:50:53 +0200
commit79e8da1f46d7f1fcf07d260f5d547c2a356cd04f (patch)
treebed6ac76007b7da7928d1c15dd578a0759653b2c /svg-flatten
parentca6e6abfdcf3f9099d5da4d237860068b03fbe66 (diff)
downloadgerbolyze-79e8da1f46d7f1fcf07d260f5d547c2a356cd04f.tar.gz
gerbolyze-79e8da1f46d7f1fcf07d260f5d547c2a356cd04f.tar.bz2
gerbolyze-79e8da1f46d7f1fcf07d260f5d547c2a356cd04f.zip
Fix phys2doc/doc2phys for image export
Diffstat (limited to 'svg-flatten')
-rw-r--r--svg-flatten/include/geom2d.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/svg-flatten/include/geom2d.hpp b/svg-flatten/include/geom2d.hpp
index 80b47df..fa5c545 100644
--- a/svg-flatten/include/geom2d.hpp
+++ b/svg-flatten/include/geom2d.hpp
@@ -99,11 +99,11 @@ namespace gerbolyze {
};
double doc2phys_dist(double dist_doc) {
- return xx * dist_doc;
+ return dist_doc * sqrt(xx*xx + xy * xy);
}
double phys2doc_dist(double dist_doc) {
- return xx * dist_doc;
+ return dist_doc / sqrt(xx*xx + xy * xy);
}
d2p doc2phys(const d2p p) {