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

investigate strange behavior 2.3 #46

Open
shiffman opened this issue Mar 19, 2014 · 1 comment
Open

investigate strange behavior 2.3 #46

shiffman opened this issue Mar 19, 2014 · 1 comment

Comments

@shiffman
Copy link
Member

http://video.natureofcode.com/2.3/#comment-1250341006

@ybakos
Copy link

ybakos commented Mar 23, 2014

I can no longer reproduce the issue ever since commit 38b836c changed the window size to 640 x 360.

To reproduce the issue, run Example 2.3, but set the size of the window to, say 800 x 200.

The root cause of the issue is floating point related. Some of the Movers have an initial velocity.y of 0.10000001, while the majority have an initial velocity.y of 0.1. Because of this, the position of those Movers with the former velocity changes differently than the majority, and we see this difference compound over time: that small minority of Movers bounce differently than the rest.

This is by no means a show-stopping bug, but I am dying to understand the initial cause of the velocity difference and why the phenomena doesn't manifest when the screen size is, say 640 x360.

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

2 participants