Skip to main content

total_momentum

Function total_momentum 

pub fn total_momentum(momenta: &[f64]) -> Option<f64>
Expand description

Computes the total momentum of a slice of momentum values.

Returns Some(0.0) for an empty slice. Returns None when any momentum value is not finite or when the sum is not finite.