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

Maximal mantissa #358

Closed
leabaertschi opened this issue Jun 13, 2018 · 4 comments
Closed

Maximal mantissa #358

leabaertschi opened this issue Jun 13, 2018 · 4 comments

Comments

@leabaertschi
Copy link

@leabaertschi leabaertschi commented Jun 13, 2018

I would like to format my numbers with a mantissa of at most 4, so if there are less decimals, it will not fill up with zeros. E.g. 1.23 => 1.23, 1.234 => 1.234, 1.2345 => 1.2345, 1.23456 => 1.2346. With the old format this could be done with this format string 0,0[.][0000]. How can this be achieved with the new formatting?
Btw. I just noticed that also when using the old format string with the latest version, the behaviour is not as expected, it always fills up with zeros at the end.

@BenjaminVanRyseghem
Copy link
Owner

@BenjaminVanRyseghem BenjaminVanRyseghem commented Jun 13, 2018

You currently can't.

But I just added a new parameter trimMantissa which will allow you to experience the same behaviour.

It will be available with the next release.

@leabaertschi
Copy link
Author

@leabaertschi leabaertschi commented Jun 13, 2018

Thanks for your fast answer. Any idea when this will be released?

@BenjaminVanRyseghem
Copy link
Owner

@BenjaminVanRyseghem BenjaminVanRyseghem commented Jun 13, 2018

in numbro 2.1.0

@BenjaminVanRyseghem
Copy link
Owner

@BenjaminVanRyseghem BenjaminVanRyseghem commented Jun 13, 2018

Thanks for your fast answer. Any idea when this will be released?

now 😄

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

Successfully merging a pull request may close this issue.

None yet
2 participants