Skip to main content

interpolate

Function interpolate 

Source
fn interpolate(points: &[(u32, u32)], x: u32) -> u32
Expand description

Piecewise-linear lookup of x in ascending (x, y) breakpoints, clamped at both ends.