[−][src]Trait building_blocks::prelude::Distance
Required methods
fn l1_distance(&self, other: &Self) -> Self::Scalar
The L1 distance between points.
fn l2_distance_squared(&self, other: &Self) -> Self::Scalar
The square of the L2 (Euclidean) distance between points.
Implementors
impl<T> Distance for PointN<[T; 2]> where
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 2]>: Point,
<PointN<[T; 2]> as Point>::Scalar == T,
[src]
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 2]>: Point,
<PointN<[T; 2]> as Point>::Scalar == T,
pub fn l1_distance(
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
[src]
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
pub fn l2_distance_squared(
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
[src]
&self,
other: &PointN<[T; 2]>
) -> <PointN<[T; 2]> as Point>::Scalar
impl<T> Distance for PointN<[T; 3]> where
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 3]>: Point,
<PointN<[T; 3]> as Point>::Scalar == T,
[src]
T: Add<T, Output = T> + Pow<u16, Output = T> + Copy + Signed,
PointN<[T; 3]>: Point,
<PointN<[T; 3]> as Point>::Scalar == T,