fn lerp(a: anytype, b: anytype, t: anytype) @TypeOf(a, b, t)

Performs linear interpolation between a and b based on t. t must be in range 0.0 to 1.0. Supports floats and vectors of floats.

This does not guarantee returning b if t is 1 due to floating-point errors. This is monotonic.

Parameters

a: anytype,
b: anytype,
t: anytype,