macro_rules! point2d {
{ x: $x:expr, y: $y:expr } => { ... };
($x:expr, $y:expr ) => { ... };
}Expand description
point2d macro to create a new point. Replacement for coord! macro from geo-types
ยงExamples
use utiles_core::{point2d, Point2d};
let p = point2d!{ x: 1.0, y: 2.0 };
assert_eq!(p.x(), 1.0);
assert_eq!(p.y(), 2.0);