[][src]Trait building_blocks_core::point::Distance

pub trait Distance: Point {
    fn l1_distance(&self, other: &Self) -> Self::Scalar;
fn l2_distance_squared(&self, other: &Self) -> Self::Scalar; }

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.

Loading content...

Implementors

impl<T> Distance for Point2<T> where
    T: Copy + Signed + Add<Output = T> + Pow<u16, Output = T>,
    Point2<T>: Point<Scalar = T>, 
[src]

impl<T> Distance for Point3<T> where
    T: Copy + Signed + Add<Output = T> + Pow<u16, Output = T>,
    Point3<T>: Point<Scalar = T>, 
[src]

Loading content...