logo

Macro geo::point[][src]

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

Creates a Point from the given coordinates.

point!(x: <number>, y: <number>)

Examples

Creating a Point, supplying x/y values:

use geo_types::point;

let p = point!(x: 181.2, y: 51.79);

assert_eq!(p, geo_types::Point(geo_types::Coordinate {
    x: 181.2,
    y: 51.79,
}));