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.
Arguments
Name
Type
Description
u
Vec4
The vector to lerp towards.
t
number
The lerping parameter.
Returns
Name
Type
Description
v
Vec4
The original vector, containing the new lerped values.
Arguments
Name
Type
Description
x
number
A value of x component to lerp towards.
y
number
A value of y component to lerp towards.
z
number
A value of z component to lerp towards.
w
number
A value of w component to lerp towards.
t
number
The lerping parameter.
Returns
Name
Type
Description
v
Vec4
The original vector, containing the new lerped values.