Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The --set-precision option is confusing #259

Closed
mrmeszaros opened this issue Aug 2, 2020 · 1 comment
Closed

The --set-precision option is confusing #259

mrmeszaros opened this issue Aug 2, 2020 · 1 comment

Comments

@mrmeszaros
Copy link

mrmeszaros commented Aug 2, 2020

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.

@mrmeszaros mrmeszaros changed the title The way precision works is confusing The way --set-precision is confusing Aug 2, 2020
@mrmeszaros mrmeszaros changed the title The way --set-precision is confusing The precision option is confusing Aug 2, 2020
@mrmeszaros mrmeszaros changed the title The precision option is confusing The --set-precision option is confusing Aug 2, 2020
@Ede123
Copy link
Member

Ede123 commented Aug 6, 2020

Basically a duplicate of #141.

See comments there for some thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants