LinearInterpolation

Linear interpolation on scalar elements. Interpolates between two scalar values x and y using a linear gradient a

T
LinearInterpolation
pure nothrow
(
T
)
(
T x
,
T y
,
float a
)
if (
__traits(isScalar, T)
)

Parameters

x
Type: T

The minimum element to interpolate by. The result of this function equals x when a = 0.

y
Type: T

The maximum element to interpolate by. The result of this function equals x when a = 1.

a
Type: float

The gradient to interpolate between x and y. Should be a value between 0f and 1f, although this function will clamp it to that range. For example, the result of this function will equal (x+y)/2 when a = 0.5

Meta