pub fn net_force_1d(forces: &[f64]) -> Option<f64>Expand description
Computes the net force from a list of scalar forces.
Returns Some(0.0) for an empty slice and None when any input or the computed result is not
finite.
ยงExamples
use use_statics::net_force_1d;
assert_eq!(net_force_1d(&[10.0, -4.0, -6.0]), Some(0.0));