[−][src]Struct geom::Pt2D
This represents world-space in meters.
Fields
inner_x: f64
inner_y: f64
Implementations
impl Pt2D
[src]
pub fn new(x: f64, y: f64) -> Pt2D
[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: &Vec<Pt2D>) -> Pt2D
[src]
pub fn approx_dedupe(pts: Vec<Pt2D>, threshold: Distance) -> Vec<Pt2D>
[src]
pub fn find_pts_between(
pts: &Vec<Pt2D>,
start: Pt2D,
end: Pt2D,
threshold: Distance
) -> Option<Vec<Pt2D>>
[src]
pts: &Vec<Pt2D>,
start: Pt2D,
end: Pt2D,
threshold: Distance
) -> Option<Vec<Pt2D>>
pub fn to_hashable(self) -> HashablePt2D
[src]
Trait Implementations
impl Clone for Pt2D
[src]
impl Copy for Pt2D
[src]
impl Debug for Pt2D
[src]
impl<'de> Deserialize<'de> for Pt2D
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Display for Pt2D
[src]
impl PartialEq<Pt2D> for Pt2D
[src]
impl Serialize 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,