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 percentage typo on precipitation #672

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PragmaTwice
Copy link

@PragmaTwice PragmaTwice commented Mar 17, 2022

String.format(Locale.ENGLISH, "%d%%", (int) (percentOfPrecipitation * 100)

In this code, if percentOfPrecipitation is 0.58, the result string will be 57%.
Using Math.round can solve this problem.

@jwierzbi
Copy link

jwierzbi commented Nov 2, 2022

Pretty sure this will also fix the issue I'm seeing (the 28.99999999... value):

Screenshot_20221028-105942

Can we get this CR merged please.

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