use na::{Real, Unit, Rotation3, Matrix4, U3, U4}; use traits::Number; use aliases::{Vec, Mat}; pub fn rotate(angle: N, v: &Vec) -> Mat { Rotation3::from_axis_angle(&Unit::new_normalize(*v), angle).to_homogeneous() } pub fn scale(v: &Vec) -> Mat { Matrix4::new_nonuniform_scaling(v) } pub fn translate(v: &Vec) -> Mat { Matrix4::new_translation(v) }