Skip to main content

downsample_points

Function downsample_points 

Source
pub fn downsample_points<T>(
    points: &[(T, f64)],
    max_points: Option<usize>,
) -> Vec<(T, f64)>
where T: Copy,
Expand description

Downsample a finite point stream while preserving first/last points and local min/max extrema in each bucket. This keeps long native path rendering bounded without hiding short spikes in monitoring-style charts.