Skip to main content

normalize

Function normalize 

Source
pub fn normalize(vector: &mut [f32])
Expand description

Stable: external consumers may depend on this; breaking changes require a SemVer bump.

L2-normalizes a vector in place through the SIMD dispatcher. Leaves zero- or NaN-norm vectors unchanged. See docs/design.md for dispatch and examples.