Skip to main content

step

Function step 

Source
pub fn step(pointer_main: f32, viewport_extent: f32, band: f32) -> f32
Expand description

The auto-scroll step, in dp, for a pointer at pointer_main along a viewport of viewport_extent.

Zero outside both bands; ramps linearly inside a band and saturates at MAX_VELOCITY past the viewport edge (a captured drag keeps reporting positions beyond the boundary). Negative scrolls toward the leading edge.

Pure, so every caller’s ramp can be unit tested without a widget tree.