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

queue range #1

Open
shitingbao opened this issue May 4, 2023 · 0 comments
Open

queue range #1

shitingbao opened this issue May 4, 2023 · 0 comments

Comments

@shitingbao
Copy link

When the max num value, it will overflow

example:

	var m uint32 = 4294967295
	log.Println(minRoundNumBy2(m))

then, you will get 0;

I think a judgment should be added
example:

	if ^v == 0 {
		v--  (the v type is uint32 )
	} else {
		v++
	}
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