use na::FromHomogeneous; use na; /// Project n-d point to a (n-1)-d space, dividing each vector by its `w` component. pub fn project_homogeneous, VHomo>(pts: &mut [VHomo]) -> Vec { let mut res = Vec::with_capacity(pts.len()); project_homogeneous_to(pts, &mut res); res } /// Project n-d point to a (n-1)-d space, dividing each vector by its `w` component. pub fn project_homogeneous_to, VHomo>(pts: &[VHomo], out: &mut Vec) { for pt in pts.iter() { out.push(na::from_homogeneous(pt)); } }