Function AStar2D.getClosestPoint

Returns the ID of the closest point to to_position, optionally taking disabled points into account. Returns -1 if there are no points in the points pool.

long getClosestPoint (
  const(Vector2) to_position,
  const(bool) include_disabled = false
) nothrow @nogc const;