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

Rolling a zero is possible #10

Closed
ehoepfner opened this Issue Jul 24, 2017 · 0 comments

Comments

1 participant
@ehoepfner

ehoepfner commented Jul 24, 2017

Math.random() could give 0 in which case steps is 0 and the subsequent loop would never run; therefore target would still be 0.

Changing the loop condition to steps >= 0 fixes this issue.

@xori xori closed this in 4ffd7e0 Jul 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment