lerp method

Vector2D lerp(
  1. Vector2D o,
  2. double amount
)

Implementation

Vector2D lerp(Vector2D o, double amount) => .vec2(
  x + amount*(o.x - x),
  y + amount*(o.y - y),
);