[−][src]Function norman::special::normalized_eucl
pub fn normalized_eucl<T: NormEucl<Output = R> + Div<R, Output = T>, R: Num>(
v: T
) -> T
Returns the normalization of v
according to the euclidean norm,
i.e. v
divided by its norm.
Attention
Due to numerical errors, the result is not guaranteed to have exactly norm 1
after calling this function.
On integer types this function will do complete nonsense since
Div
is implemented as an integer division for integers.