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 number formatter #99

Merged
merged 2 commits into from
Jul 27, 2017
Merged

Fix number formatter #99

merged 2 commits into from
Jul 27, 2017

Conversation

wbobeirne
Copy link
Contributor

@wbobeirne wbobeirne commented Jul 27, 2017

Number formatter was failing in the following cases:

Input: 0.0127491, default digits desired
Expected output: 0.013
Actual output: 0.13

Input: 100.48391, 0 digits desired
Expected output: 100
Actual output: Error!

Fixed those cases, commented up the function a bit to make it easier to understand, and added tests.

@wbobeirne
Copy link
Contributor Author

Fixes #98.

Copy link
Contributor

@crptm crptm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

3 participants