Skip to content

Commit

Permalink
Fix a bug that benchmark stopped too early
Browse files Browse the repository at this point in the history
It would always stop at TIME_BALL_HAS_TO_LEAVE_CIRCLE time before
  • Loading branch information
klausdorer committed Jul 1, 2024
1 parent 1da9ff2 commit 1b7e3b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ protected boolean onDuringBenchmark()
return true;
}
// stop if the ball did not leave the circle for too long
if (time - startTime > TIME_BALL_HAS_TO_LEAVE_CIRCLE) {
if (ballNow.distance(ballInitial) < MAX_BALL_DISTANCE && time - startTime > TIME_BALL_HAS_TO_LEAVE_CIRCLE) {
return true;
}

Expand Down

0 comments on commit 1b7e3b4

Please sign in to comment.