Skip to content

Handle multipleOf between 0 and 1 #1458

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

Merged

Conversation

feliperuiz
Copy link
Contributor

This pull request fixes handling of multipleOf between 0 and 1, as specified in #1457. I've also added a test case for this specific scenario.

The existing code would call intValue(), which involves rounding. When that would happen, low values would round to 0, failing the ensuing test.

P.S.: Getting to the else branch trigger a NullPointerException because result is null. I haven't tried to fix that issue as I believe it would be a completely different beast.

@kerrykimbrough
Copy link
Contributor

👍

@gracekarina
Copy link
Contributor

@feliperuiz thanks for the PR!

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.

None yet

3 participants