[][src]Trait rust_3d::HasDistanceTo

pub trait HasDistanceTo<T> {
    fn sqr_distance(&self, other: &T) -> NonNegative;

    fn distance(&self, other: &T) -> NonNegative { ... }
}

HasDistanceTo trait used for types which have a defined distance towards another T. Implementing HasDistanceTo for U also implements HasDistanceTo for T

Required methods

fn sqr_distance(&self, other: &T) -> NonNegative

Should return the sqr distance to other

Loading content...

Provided methods

fn distance(&self, other: &T) -> NonNegative

The distance to other

Loading content...

Implementors

impl HasDistanceTo<BoundingBox2D> for BoundingBox2D[src]

impl HasDistanceTo<BoundingBox3D> for BoundingBox3D[src]

impl<P> HasDistanceTo<P> for dyn Is2D where
    P: Is2D
[src]

impl<P> HasDistanceTo<P> for dyn Is3D where
    P: Is3D
[src]

Loading content...