lerpVectors method

Vector4 lerpVectors(
  1. Vector4 v1,
  2. Vector4 v2,
  3. num alpha
)

Implementation

Vector4 lerpVectors(Vector4 v1, Vector4 v2, num alpha) {
  x = v1.x + (v2.x - v1.x) * alpha;
  y = v1.y + (v2.y - v1.y) * alpha;
  z = v1.z + (v2.z - v1.z) * alpha;
  w = v1.w + (v2.w - v1.w) * alpha;

  return this;
}