From 604cf260a34347236014615837a6fb28fe870aae Mon Sep 17 00:00:00 2001 From: Frederic <110906630+FrUhr@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:43:04 +0100 Subject: [PATCH] Change stop condition of demo to avoid being stuck in loop --- demos/BouncingBallGif/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/BouncingBallGif/Program.cs b/demos/BouncingBallGif/Program.cs index ecf1231..0a748ee 100644 --- a/demos/BouncingBallGif/Program.cs +++ b/demos/BouncingBallGif/Program.cs @@ -34,7 +34,7 @@ static void Main() instance.WriteReal((velocity, v)); using var gif = new AnimatedGifCreator("BouncingBall.gif"); instance.StartTime(0.0); - while (h > 0 || Math.Abs(v) > 0) + while (h > 0.001 || Math.Abs(v) > 0) { var variables = instance.ReadReal(altitude, velocity).ToArray(); h = variables.First();