Skip to content

Rounding issues / bugfix #797

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

udatny
Copy link

@udatny udatny commented Mar 17, 2025

i tried to use the 2.0 version / masterbranch for converting text into svg.
i ran into issues with NaN's in the svg paths.
this is my bugfix for it, including a test. sorry for the formatting issues.
why is this repo / project so abandoned?

@Connum
Copy link
Contributor

Connum commented Mar 17, 2025

why is this repo / project so abandoned?

I have been the only one who still spends at least some time to look at new issues for quite some time, all other maintainers are too busy with their jobs and private lives. But maintaining a project of this size is too much for a single person to handle in their free time. I would love to add more features, but contributions by one maintainer require a review by at least another one, so some of my own PRs have taken very long or have still not been reviewed, which has taken away from my motivation to spend time on this project as well.

If there were more active maintainers, I would be willing to spend more time myself again.

Regarding your PR: I would prefer to find out why the result is NaN in the first place and handle the rounding correctly in those cases, instead of returning the unrounded value.

@udatny
Copy link
Author

udatny commented Mar 19, 2025

the reason is, that the decimalPart in the case for the number in the test already has an exponent, like this: 5.684341886080802e-14
and then the rounding tries to add another e+2, which gives an invaldi number.

so basically its about how you round and concatenate the number.

i improved the test and fixed the code accordingly.

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

Successfully merging this pull request may close these issues.

2 participants