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.