[]Function rusty_engine::prelude::glm::mix

pub fn mix<N, D>(
    x: &Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>,
    y: &Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>,
    a: N
) -> Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer> where
    D: Dimension,
    N: Number,
    DefaultAllocator: Alloc<N, D, U1>, 

Returns x * (1.0 - a) + y * a, i.e., the linear blend of the vectors x and y using the scalar value a.

The value for a is not restricted to the range [0, 1].

Examples:

let x = glm::vec3(1.0, 2.0, 3.0);
let y = glm::vec3(10.0, 20.0, 30.0);
assert_eq!(glm::mix(&x, &y, 0.1), glm::vec3(1.9, 3.8, 5.7));

See also: