min_height for bounce as a parameter

This commit is contained in:
Rémi Oudin 2018-02-12 12:06:44 +01:00
parent e80becdaee
commit 19cb1eb343

View file

@ -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);
}