Function grid_map::bindIndexToRange

Function Documentation

unsigned int grid_map::bindIndexToRange(int idReq, unsigned int nElem)

Takes the id requested, performs checks and returns an id that it is within the specified bounds.

Parameters:
  • idReq[in] - input index .

  • nElem[in] - number of elements in the container

Returns:

index that is within [0, nElem-1].