vec3:lerp

Performs a linear interpolation between this vector and another one, which can be used to smoothly animate between two vectors, based on a parameter value. A parameter value of 0 will leave the vector unchanged, a parameter value of 1 will set the vector to be equal to the input vector, and a value of .5 will set the components to be halfway between the two vectors.

v = vec3:lerp(u, t)

Arguments

NameTypeDescription
uvec3The vector to lerp towards.
tnumberThe lerping parameter.

Returns

NameTypeDescription
vvec3The original vector, containing the new lerped values.

See also