Skip to main content

get_length_and_normalize

Function get_length_and_normalize 

Source
pub fn get_length_and_normalize(length: &mut f32, v: Vec2) -> Vec2
Expand description

Convert a vector into a unit vector if possible, otherwise returns the zero vector. Also outputs the length.