aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/include/geom2d.hpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-04-16 20:13:24 +0200
committerjaseg <git@jaseg.de>2023-04-16 20:13:24 +0200
commit288e36764cf961bcb2bad6c2810c0de5344e77da (patch)
tree911df53db737aab572c2742584f81338ffe088cb /svg-flatten/include/geom2d.hpp
parent4aa448a5a37889d80fbf6ef006c5db1dd7c55f39 (diff)
downloadgerbolyze-288e36764cf961bcb2bad6c2810c0de5344e77da.tar.gz
gerbolyze-288e36764cf961bcb2bad6c2810c0de5344e77da.tar.bz2
gerbolyze-288e36764cf961bcb2bad6c2810c0de5344e77da.zip
svg-flatten: Fix broken math in transform inversion
Diffstat (limited to 'svg-flatten/include/geom2d.hpp')
-rw-r--r--svg-flatten/include/geom2d.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/svg-flatten/include/geom2d.hpp b/svg-flatten/include/geom2d.hpp
index 7c3b5ba..34455cd 100644
--- a/svg-flatten/include/geom2d.hpp
+++ b/svg-flatten/include/geom2d.hpp
@@ -234,8 +234,8 @@ namespace gerbolyze {
return *this;
}
- *this = xform2d(yy/det, -yx/det,
- -xy/det, xx/det,
+ *this = xform2d(yy/det, -xy/det,
+ -yx/det, xx/det,
(xy*y0 - yy*x0)/det, (yx*x0 - xx*y0)/det);
if (success_out)
@@ -300,8 +300,8 @@ namespace gerbolyze {
ostringstream os;
os << "xform2d< " << setw(5);
os << xx << ", " << xy << ", " << x0 << " / ";
- os << yy << ", " << yx << ", " << y0 << " / ";
- os << "θ=" << theta << ", m=" << m << " s=(" << s_x << ", " << s_y << " | ";
+ os << yx << ", " << yy << ", " << y0 << " / ";
+ os << "θ=" << theta << ", m=" << m << " s=(" << s_x << ", " << s_y << ") | ";
os << "f_min=" << f_min << ", f_max=" << f_max;
os << " >";
return os.str();