pub trait AlmostCollidesWith<T> {
// Required method
fn almost_collides_with(&self, other: &T) -> bool;
}Expand description
Trait for types that can detect ‘almost-collisions’ between self and other of type T.
Due to floating point arithmetic precision, two objects that are very close to each other may have unexpected behavior with
the CollidesWith trait. This trait errors on the side of false positives, so that if two objects are very close to each other,
they will be considered as colliding.
Required Methods§
fn almost_collides_with(&self, other: &T) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".