Skip to main content

relative_velocity

Function relative_velocity 

Source
pub fn relative_velocity(velocity_a: f64, velocity_b: f64) -> Option<f64>
Expand description

Computes the signed relative velocity between two one-dimensional bodies.

Formula: v_rel = v_a - v_b