From 19cb1eb3434e89a3a3d7f4dd19af442d3f9423d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Oudin?= Date: Mon, 12 Feb 2018 12:06:44 +0100 Subject: [PATCH] min_height for bounce as a parameter --- Ball.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ball.cpp b/Ball.cpp index aa623ce..82338a4 100644 --- a/Ball.cpp +++ b/Ball.cpp @@ -18,7 +18,7 @@ Ball::Ball(Point& _center, double _min_height, double _v_x, double _p, double _q } void Ball::_compute_pos(double dt) { - Center.z = fmax(0.0, A + B * crt_time - (G_CTE / 2) * crt_time * crt_time); + Center.z = fmax(0.0, A + B * crt_time - (G_CTE / 2) * crt_time * crt_time + min_height); Center.x += dt * v_x; surface.update_center_pos(Center); }