Trait Distance
Source pub trait Distance<T = Self> {
type Output;
// Required method
fn distance(&self, other: T) -> Self::Output;
}
Expand description
Is implemented by basic types to calculate distances.
Computes the absolute distance between two values.
Parameters:
other: specifies the value whose distance is calculated to self
Returns the absolute difference, i.e. distance between the two given values
as a new instance.