jagua_rs::geometry::geo_traits

Trait Distance

Source
pub trait Distance<T> {
    // Required methods
    fn distance(&self, other: &T) -> fsize;
    fn sq_distance(&self, other: &T) -> fsize;
}
Expand description

Trait for geometric primitives that can calculate distances to other primitives.

Required Methods§

Source

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

Minimum distance between two primitives. 0.0 if the primitives collide

Source

fn sq_distance(&self, other: &T) -> fsize

Squared version of Distance::distance

Implementors§