Skip to main content

smooth

Function smooth 

Source
pub fn smooth(points: &[[f32; 2]], closed: bool, steps: usize) -> Vec<[f32; 2]>
Expand description

A smooth curve through points, as straight pieces: steps of them between two neighbouring points. It passes through every point (a Catmull-Rom spline), so a path clicked corner by corner becomes the curve a bent strip makes. A closed curve runs back round to the first point.