Skip to main content

verlet

Function verlet 

Source
pub fn verlet(
    x0: f64,
    v0: f64,
    a: impl Fn(f64) -> f64,
    dt: f64,
    steps: usize,
) -> Vec<(f64, f64, f64)>
Expand description

Störmer-Verlet integrator for second-order ODE x’’ = a(x). Returns vec of (t, x, v).