MCPcopy Create free account
hub / github.com/alceal/plotlars / parse_svg_points

Function parse_svg_points

crates/plotlars-plotters/src/render/mod.rs:258–265  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

256}
257
258fn parse_svg_points(s: &str) -> Vec<(f64, f64)> {
259 s.split_whitespace()
260 .filter_map(|p| {
261 let (x, y) = p.split_once(',')?;
262 Some((x.parse().ok()?, y.parse().ok()?))
263 })
264 .collect()
265}
266
267fn format_svg_points(pts: &[(f64, f64)]) -> String {
268 pts.iter()

Callers 1

simplify_svg_polylinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected