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§
Sourcefn distance(&self, other: &T) -> fsize
fn distance(&self, other: &T) -> fsize
Minimum distance between two primitives. 0.0 if the primitives collide
Sourcefn sq_distance(&self, other: &T) -> fsize
fn sq_distance(&self, other: &T) -> fsize
Squared version of Distance::distance