Trait truck_geometry::base::MetricSpace [−]
pub trait MetricSpace {
type Metric;
fn distance2(self, other: Self) -> Self::Metric;
fn distance(self, other: Self) -> Self::Metric
where
Self::Metric: Float,
{ ... }
}
Expand description
A type with a distance function between values.
Examples are vectors, points, and quaternions.
Associated Types
type Metric
type Metric
The metric to be returned by the distance
function.