pub trait DistanceTo<T> {
// Required methods
fn distance_to(&self, other: &T) -> f32;
fn sq_distance_to(&self, other: &T) -> f32;
}
Expand description
Trait for types that can compute the minimum distance between self
and other
of type T
.
Required Methods§
Sourcefn distance_to(&self, other: &T) -> f32
fn distance_to(&self, other: &T) -> f32
Minimum distance between two primitives. Will be 0 in case of a collision.
Sourcefn sq_distance_to(&self, other: &T) -> f32
fn sq_distance_to(&self, other: &T) -> f32
Squared version of DistanceTo::distance_to