pub fn central_difference<F>(f: F, x: f64, direction: f64, step: f64) -> f64where F: Fn(f64) -> f64,
Estimates a scalar directional derivative with a central difference.