lerp method

Vector2 lerp(
  1. Vector2 other,
  2. double t
)

Implementation

Vector2 lerp(Vector2 other, double t) {
  return Vector2(
    x + (other.x - x) * t,
    y + (other.y - y) * t,
  );
}