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

Function getQuadrant

grid_map_core/src/GridMapMath.cpp:101–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101inline BufferRegion::Quadrant getQuadrant(const Index& index, const Index& bufferStartIndex)
102{
103 if (index[0] >= bufferStartIndex[0] && index[1] >= bufferStartIndex[1]) return BufferRegion::Quadrant::TopLeft;
104 if (index[0] >= bufferStartIndex[0] && index[1] < bufferStartIndex[1]) return BufferRegion::Quadrant::TopRight;
105 if (index[0] < bufferStartIndex[0] && index[1] >= bufferStartIndex[1]) return BufferRegion::Quadrant::BottomLeft;
106 if (index[0] < bufferStartIndex[0] && index[1] < bufferStartIndex[1]) return BufferRegion::Quadrant::BottomRight;
107 return BufferRegion::Quadrant::Undefined;
108}
109
110} // namespace
111

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected