pub trait Distance {
// Required method
fn distance(self, other: Self) -> f32;
}Expand description
Distance trait for calculating the distance between two values.
It’s necessary for animation along a path in Keyframes::poly_to.
The lib provides implementations for primitive types and tuples.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.