pub trait Magnitude<T: Float> {
// Required methods
fn length(a: Self) -> T;
fn mag(a: Self) -> T;
fn mag2(a: Self) -> T;
fn normalize(a: Self) -> Self;
}Expand description
trait for operations involve vector magnitude or dot product