[][src]Function nalgebra_glm::mix_scalar

pub fn mix_scalar<N: Number>(x: N, y: N, a: N) -> N

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

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

Examples:

assert_eq!(glm::mix_scalar(2.0, 20.0, 0.1), 3.8);

See also: