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

Event detection: potential division by 0 #61

Open
esdalmaijer opened this issue Apr 22, 2016 · 0 comments
Open

Event detection: potential division by 0 #61

esdalmaijer opened this issue Apr 22, 2016 · 0 comments

Comments

@esdalmaijer
Copy link
Owner

Two time stamps are subtracted from each other, and then a distance is divided by the time difference. If the time difference is zero, the result is a crash.

See: https://github.com/esdalmaijer/PyGaze/blob/master/pygaze/_eyetracker/libeyetribe.py#L967 (and in a few lines around there).

Solution: check whether time has passed, and only proceed if t1-t0 > 0.

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