closeToDestination method

bool closeToDestination([
  1. int pathLength = 3,
  2. double distance = 2
])

Indicates if current position is close enough to current destination

Implementation

bool closeToDestination([int pathLength = 3, double distance = 2]) {
  return path.length() == pathLength && distanceToDestination() <= distance;
}