Vector lerp(Vector to, num t)

Source

Vector lerp(Vector to, num t) {
  return new Vector(x + t * (to.x - x), y + t * (to.y - y));
}