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

Fix float formatting in web utils #187

Closed
wants to merge 1 commit into from
Closed

Conversation

cwitting
Copy link

@cwitting cwitting commented Mar 1, 2022

Before any negative number would be rendered as a scientific number in javascript.
I think this is more in line with the intention, which will render
numerically very small and very large numbers as scientific.

Here is an example of rendered javascript before and after
before:
ctx.moveTo(-8.6e00,-1.4e01);ctx.lineTo(8.6,-1.4e01);ctx.lineTo(8.6,14.0);ctx.lineTo(-8.6e00,14.0);ctx.lineTo(-8.6e00,-1.4e01);
after:
ctx.moveTo(-8.6,-14.0);ctx.lineTo(8.6,-14.0);ctx.lineTo(8.6,14.0);ctx.lineTo(-8.6,14.0);ctx.lineTo(-8.6,-14.0);

I think the second one is more correct.

Before any negative number would be rendered as a scientific number.
I think this is more in line with the intention, which will render
numerically very small and very large numbers as scientific.
@emweb
Copy link
Collaborator

emweb commented Jun 23, 2022

Thanks, I merged this manually.

Roel

@emweb emweb closed this Jun 23, 2022
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