[][src]Trait googleprojection::Coord

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.

Loading content...

Implementations on Foreign Types

impl Coord for (f64, f64)[src]

Loading content...


Loading content...