Skip to main content

PointDist

Trait PointDist 

Source
pub trait PointDist {
    // Required method
    fn dist(&self, other: &Self) -> f64;
}
Expand description

A point capable of computing the straight-line distance between itself and another point of the same type.

Required Methods§

Source

fn dist(&self, other: &Self) -> f64

Computes the straight-line distance between self and other.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, const N: usize> PointDist for PointNd<T, N>
where T: Copy + NumCast,

Source§

impl<T> PointDist for Point2d<T>
where T: Copy + NumCast,

Source§

impl<T> PointDist for Point3d<T>
where T: Copy + NumCast,