pub fn transformation<T: Copy + NumAssign>(
    translation: Vec3<T>,
    rotation: Quaternion<T>,
    scaling: Vec3<T>
) -> Mat4<T>
Expand description

Creates a 4x4 matrix that represents a transformation in TRS order (= translation * rotation * scaling).

Examples

assert_float_eq!(
    transform::transformation(
        vec3(1., 2., 3.),
        quat(0.5/3_f32.sqrt(), 0.5/3_f32.sqrt(), 0.5/3_f32.sqrt(), 3_f32.sqrt()/2.),
        vec3(3., 6., 9.),
    ).as_ref(),
    &[2., 2., -1., 0., -2., 4., 4., 0., 6., -3., 6., 0., 1., 2., 3., 1.]
);