Closed lukehutch closed 4 years ago
The following operation is very common in many applications, but it is inefficient if implemented as shown:
Vector3d v3 = v1.mul(1.0 - alpha, new Vector3d()).add(v2.mul(alpha, new Vector3d());
It would be handy (and more efficient) to have a method v1.linearInterpolation(v2, alpha, dest) that implements this directly.
v1.linearInterpolation(v2, alpha, dest)
Or potentially this could be called lerp, since the Quaternion version is already named slerp.
lerp
Quaternion
slerp
Oops, found it -- it already exists as lerp :-) (Sorry! I was looking under linearInterpolation...)
linearInterpolation
The following operation is very common in many applications, but it is inefficient if implemented as shown:
It would be handy (and more efficient) to have a method
v1.linearInterpolation(v2, alpha, dest)
that implements this directly.Or potentially this could be called
lerp
, since theQuaternion
version is already namedslerp
.