Skip to main content

compute_norm

Function compute_norm 

Source
pub fn compute_norm(vec: &[f32]) -> f32
Expand description

Compute L2 norm of a vector

§Arguments

  • vec - Input vector

§Returns

  • L2 norm (magnitude) of the vector