Function arrive

Source
pub fn arrive(
    position: [f32; 2],
    target: [f32; 2],
    max_speed: f32,
    slow_radius: f32,
) -> [f32; 2]
Expand description

Desired velocity toward a target, slowing smoothly within the arrival radius. Invalid or non-positive parameters produce a stopped agent rather than NaNs.