Macro iron_shapes::polygon
source · [−]macro_rules! polygon {
($($x:expr),*) => { ... };
}
Expand description
Shorthand notation for creating a polygon.
Example
use iron_shapes::prelude::*;
let p = polygon!((0, 0), (1, 0), (1, 1));
assert_eq!(p, Polygon::new(vec![(0, 0), (1, 0), (1, 1)]));