pub trait PointDistance<T: CoordNum> {
// Required methods
fn distance(&self, other: &Point<T>) -> T;
fn length(&self) -> T;
}Expand description
Trait that implements a distance function between two geo_types::Point structs.
Also includes a length function which returns the length of a geo_types::Point
as if it were a Vector.
Required Methods§
Sourcefn distance(&self, other: &Point<T>) -> T
fn distance(&self, other: &Point<T>) -> T
Return the scalar distance between two geo_types::Points.
Sourcefn length(&self) -> T
fn length(&self) -> T
Treat a geo_types::Point as a Vector and return its scalar length.