pub fn translation<T: Copy + NumAssign>(v: Vec3<T>) -> Mat4<T>
Expand description

Creates a 4x4 transformation matrix that represents a translation of (x, y, z).

Examples

assert_eq!(*transform::translation(vec3(2_i32, 3, 5)).as_ref(), [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 3, 5, 1]);