lerp method

void lerp(
  1. Vector2 to,
  2. double t
)

Linearly interpolate towards another Vector2

Implementation

void lerp(Vector2 to, double t) {
  setFrom(
    _reusableVector
      ..setFrom(to)
      ..sub(this)
      ..scale(t)
      ..add(this),
  );
}