logo
macro_rules! coord {
    (x: $x:expr, y: $y:expr $(,)* ) => { ... };
}
Expand description

Creates a Coordinate from the given scalars.

coord! { x: <number>, y: <number> }

Examples

Creating a Coordinate, supplying x/y values:

use geo_types::coord;

let c = coord! { x: 181.2, y: 51.79 };

assert_eq!(c, geo_types::coord! { x: 181.2, y: 51.79 });