pub trait LengthSquared {
type Output;
// Required method
fn length_squared(&self) -> Self::Output;
}Expand description
This type abstracts a vector or other object that can represents a length. Get’s the square of the length as this can often skip an expensive square root calculation.
Required Associated Types§
Required Methods§
fn length_squared(&self) -> Self::Output
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".