Skip to main content

scaling

Function scaling 

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

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

ยงExamples

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