Skip to main content

l2_normalize_f32

Function l2_normalize_f32 

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

Normalize a dense vector in-place using L2 normalization.

After normalization, the vector has unit length (L2 norm = 1.0). If the vector is zero, it is left unchanged.