macro_rules! linestring {
[ $( ( $($pt:expr),+ $(,)? ) ),* $(,)? ] => { ... };
}Expand description
Construct a crate::Linestring from a comma-separated
list of (x, y) tuples.
Each tuple is expanded through point! and the resulting points
are collected into a Vec, then wrapped via
Linestring::from_vec.
§Examples
use geometry_cs::Cartesian;
use geometry_model::{linestring, Linestring, Point2D};
use geometry_trait::Linestring as _;
let ls: Linestring<Point2D<f64, Cartesian>> =
linestring![(0.0, 0.0), (1.0, 1.0), (2.0, 0.0)];
assert_eq!(ls.points().count(), 3);