lerp method

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

Implementation

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