Function grid_map::boundPositionToRange

Function Documentation

void grid_map::boundPositionToRange(Position &position, const Length &mapLength, const Position &mapPosition)

Bound (cuts off) the position to lie inside the map. This means that an index that overflows is stopped at the last valid index.

Parameters:
  • [in/out] – position the position to be bounded.

  • mapLength[in] the lengths in x and y direction.

  • mapPosition[in] the position of the map.