Skip to main content

vec3_project_onto

Function vec3_project_onto 

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

Project v onto the unit direction onto_unit.

Returns the component of v parallel to onto_unit. onto_unit must be a unit vector.