Struct geom::Pt2D [−][src]
This represents world-space in meters.
Fields
x: f64
y: f64
Implementations
impl Pt2D
[src]
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]
pts: &[Pt2D],
start: Pt2D,
end: Pt2D,
threshold: Distance
) -> Option<Vec<Pt2D>>
pub fn to_hashable(self) -> HashablePt2D
[src]
Trait Implementations
impl<'de> Deserialize<'de> 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 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> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,