The --set-precision option is confusing
mrmeszaros opened this issue · comments
Mészáros Máté Róbert commented
Hey,
As I understand precision
controls the number of significant digits.
However, this means that close to zero, the grid is finer, while farther away it gets coarser. For example:
<svg>
<path d="m 100.501 .999"/>
</svg>
Now if I run it with --set-precision=3
, it produces the following:
<svg>
<path d="m101 0.999"/>
</svg>
I suggest to either change the behavior to round to decimal places, or to introduce a new option that implements that kind of rounding.
For example: --set-rounding=N
will round numbers to the nearest 1e-N
. This would work like python's round built-in
method.
Patrick Storz commented
Basically a duplicate of #141.
See comments there for some thoughts.