lerpVectors method

Vector2 lerpVectors(
  1. Vector2 v1,
  2. Vector2 v2,
  3. double alpha
)

Implementation

Vector2 lerpVectors(Vector2 v1, Vector2 v2, double alpha) {
  x = v1.x + (v2.x - v1.x) * alpha;
  y = v1.y + (v2.y - v1.y) * alpha;

  return this;
}