Skip to main content

sweep_time_of_impact

Function sweep_time_of_impact 

Source
pub fn sweep_time_of_impact(
    proxy_a: &ToiProxy<'_>,
    sweep_a: &Sweep,
    proxy_b: &ToiProxy<'_>,
    sweep_b: &Sweep,
    max_fraction: f32,
    linear_slop: f32,
) -> SweepToiOutput
Expand description

Computes the time of impact between two proxies following endpoint-interpolated sweeps.

The shapes are advanced to the earliest time in [0, max_fraction] at which their core-shape separation drops to max(linear_slop, radius_a + radius_b - linear_slop). linear_slop is typically 0.005 length units.