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

[feature suggestion] add roundingMethod option #131

Merged

Conversation

tomoto-hitachi
Copy link
Contributor

Greetings, first I want to thank you for providing this useful library. This PR is a feature suggestion to make it even more useful for us and hopefully for others as well.

This PR is aiming to add an option roundingMethod, which allows you to round the number not only by round, but also floor or ceil. This came out of an actual business requirement we got, "never show the capacity more than actually available to the user", where rounding up could be a problem hence we need to use floor.

I hope you find this useful and worth to be merged. I tried to follow the style convention of the existing code, but please feel free to tell me if I am missing anything. Thank you very much and have a great day!

@avoidwork avoidwork merged commit 6418869 into avoidwork:master Apr 21, 2021
@avoidwork
Copy link
Owner

Great idea, thanks!

@avoidwork
Copy link
Owner

This is 6.3.0 👍🏻

@tomoto-hitachi
Copy link
Contributor Author

Thank you for your quick response! 👍

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