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

incorrect placement of float64() #199

Open
setharnold opened this issue Jan 15, 2022 · 0 comments
Open

incorrect placement of float64() #199

setharnold opened this issue Jan 15, 2022 · 0 comments

Comments

@setharnold
Copy link

gapLeft := int(math.Ceil(float64(gap / 2)))

Hello, Coverity flagged this line:

		gapLeft := int(math.Ceil(float64(gap / 2)))

as having a mistake -- the gap / 2 is truncated towards zero: https://go.dev/ref/spec#Integer_operators -- thus the math.Ceil() isn't doing anything.

Thanks

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

No branches or pull requests

1 participant