moveTowards method

void moveTowards(
  1. Vec2 other,
  2. double maxDelta
)

Implementation

void moveTowards(Vec2 other, double maxDelta) {
  x = MathUtils.moveTowards(x, other.x, maxDelta);
  y = MathUtils.moveTowards(y, other.y, maxDelta);
}