Skip to main content

COAST_STOP_THRESHOLD

Constant COAST_STOP_THRESHOLD 

Source
pub const COAST_STOP_THRESHOLD: f32 = 15.0;
Expand description

Velocity magnitude (px/s) below which coasting is considered “stopped.” Raised from an earlier 0.5 — at 0.92 friction the tail from 0.5 down to truly zero motion is imperceptible but still real seconds of elapsed time; 15px/s is still much slower than any perceptible motion but cuts the long, invisible tail short. Combined with MAX_VELOCITY and a slightly higher friction (ScrollStyle::default_for_platform), brings total coast time for the full realistic velocity range down to ~0.35s-0.7s (confirmed by direct calculation), instead of 1.2s-1.9s+.