Trait googleprojection::Coord
[−]
[src]
pub trait Coord {
fn x(&self) -> f64;
fn y(&self) -> f64;
fn with_xy(f64, f64) -> Self;
}A trait for everything that can be treated as a coordinate for a projection.
Implement this trait if you have a custom type to be able to project to and from it directly.
There exist an impl for this for (f64, f64) out of the box (formatted as (x, y), or (lon, lat)).
Required Methods
fn x(&self) -> f64
Return the first of the f64 pair.
fn y(&self) -> f64
Return the second of the f64 pair.
fn with_xy(f64, f64) -> Self
Construct a new Coord implementation from two f64.