Struct geom::pt::Pt2D[][src]

pub struct Pt2D {
    x: f64,
    y: f64,
}

This represents world-space in meters.

Fields

x: f64y: f64

Implementations

impl Pt2D[src]

pub fn new(x: f64, y: f64) -> Pt2D[src]

pub fn zero() -> Self[src]

pub fn approx_eq(self, other: Pt2D, threshold: Distance) -> bool[src]

pub fn to_gps(self, b: &GPSBounds) -> LonLat[src]

Can go out of bounds.

pub fn x(self) -> f64[src]

pub fn y(self) -> f64[src]

pub fn project_away(self, dist: Distance, theta: Angle) -> Pt2D[src]

pub(crate) fn raw_dist_to(self, to: Pt2D) -> f64[src]

pub fn dist_to(self, to: Pt2D) -> Distance[src]

pub fn fast_dist(self, other: Pt2D) -> NotNan<f64>[src]

Pretty meaningless units, for comparing distances very roughly

pub fn angle_to(self, to: Pt2D) -> Angle[src]

pub fn offset(self, dx: f64, dy: f64) -> Pt2D[src]

pub fn center(pts: &[Pt2D]) -> Pt2D[src]

pub fn approx_dedupe(pts: Vec<Pt2D>, threshold: Distance) -> Vec<Pt2D>[src]

pub fn find_pts_between(
    pts: &[Pt2D],
    start: Pt2D,
    end: Pt2D,
    threshold: Distance
) -> Option<Vec<Pt2D>>
[src]

pub fn to_hashable(self) -> HashablePt2D[src]

Trait Implementations

impl Clone for Pt2D[src]

impl Debug for Pt2D[src]

impl<'de> Deserialize<'de> for Pt2D[src]

impl Display for Pt2D[src]

impl From<Coordinate<f64>> for Pt2D[src]

impl From<Point<f64>> for Pt2D[src]

impl From<Pt2D> for Coordinate<f64>[src]

impl From<Pt2D> for Point<f64>[src]

impl PartialEq<Pt2D> for Pt2D[src]

impl Serialize for Pt2D[src]

impl Copy for Pt2D[src]

Auto Trait Implementations

impl RefUnwindSafe for Pt2D

impl Send for Pt2D

impl Sync for Pt2D

impl Unpin for Pt2D

impl UnwindSafe for Pt2D

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]