pub fn entrypoint(p: &mut Pendulum) -> f64
Expand description

Entry point of the integrator.

There is no guarantee that the integrator converges with the given time step size dt. As a remedy, I try to integrate the equation anyway, and make dt halved if it turns out to fail. With this approach, however, dt gets smaller and smaller as proceeds. To avoid unnecessarily small dt, I first double it.