Skip to main content

normalize_vec3

Function normalize_vec3 

Source
pub fn normalize_vec3(v: Vec3) -> Result<Vec3, VecError>
Expand description

Normalizes a Vec3 into a unit vector, or returns Err(VecError::ZeroNorm) if zero.