mathandy / svgpathtools

A collection of tools for manipulating and analyzing SVG Path objects and Bezier curves.
MIT License
557 stars 142 forks source link

Format floating point numbers in output d-paths #225

Open ohnorobo opened 4 months ago

ohnorobo commented 4 months ago

Format the floating point numbers output by Path.d to avoid a bunch of .x0000000000001 and .x999999999999 noise. Fixes https://github.com/mathandy/svgpathtools/issues/223.

Changed behavior:

This change also removes the need for special python2/3 casing in test.test_generation.TestGeneration.test_path_parsing since the behavior of g is the same in both. It may be possible to further simplify this test.