Skip to main content

vec3_project_onto_unit

Function vec3_project_onto_unit 

Source
pub fn vec3_project_onto_unit(v: &Vec3, onto_unit: &Vec3) -> Vec3
Expand description

Project vector v onto unit direction onto_unit.

onto_unit is assumed to be normalised; the caller is responsible for ensuring that is the case.