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 for negative numbers, humanFriendly and customSectors #326

Merged
merged 3 commits into from
Jul 30, 2019

Conversation

robertsLando
Copy link
Collaborator

@robertsLando robertsLando commented Jan 11, 2019

When human friendly flag is true numbers less than 1k (1000) are not rounded and the function doesn't work with negative numbers.

Ex: n = 123.456789 d = 2
Output: 123.456789 <--- Error
Expected: 123.45

Negatives: n = -1150 d = 2
Output: -1150 <-- Error
Expected: -1.15K

When human friendly flag is true numbers less than 1k (1000) are not rounded.

Ex: n = 123.456789 d = 2  
Output: 123.456789  <--- Error
Expected: 123.45
@robertsLando robertsLando changed the title Round Human friendly numbers less than 1000 Round Human friendly numbers less than 1000 and fix for negative numbers Jan 12, 2019
@robertsLando robertsLando changed the title Round Human friendly numbers less than 1000 and fix for negative numbers Fix for negative numbers, humanFriendly and customSectors Jun 19, 2019
@robertsLando robertsLando merged commit 58f03b9 into toorshia:master Jul 30, 2019
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.

1 participant