Function nalgebra_glm::lerp_scalar

source ·
pub fn lerp_scalar<N: Number>(x: N, y: N, a: N) -> N
Expand description

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]. This is an alias for mix_scalar.

Examples:

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

See also: