MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / bindIndexToRange

Function bindIndexToRange

grid_map_core/src/CubicInterpolation.cpp:16–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14namespace grid_map {
15
16unsigned int bindIndexToRange(int idReq, unsigned int nElem)
17{
18 if (idReq < 0) {
19 return 0;
20 }
21 if (idReq >= nElem) {
22 return static_cast<unsigned int>(nElem - 1);
23 }
24 return static_cast<unsigned int>(idReq);
25}
26
27double getLayerValue(const Matrix &layerMat, int rowReq, int colReq)
28{

Callers 4

getLayerValueFunction · 0.85
bindIndicesToRangeFunction · 0.85
firstOrderDerivativeAtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected