MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / boundingSegment

Method boundingSegment

libraries/SparseArray/SparseArray.cpp:109–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107
108
109void SparseArray::boundingSegment(uint16_t &minX, uint16_t &maxX)
110{
111 uint16_t _minx = 65535, _maxx = 0;
112 for (uint16_t i = 0; i < _count; i++)
113 {
114 if (_x[i] < _minx) _minx = _x[i];
115 if (_x[i] > _maxx) _maxx = _x[i];
116 }
117 minX = _minx;
118 maxX = _maxx;
119}
120
121
122//////////////////////////////////////////////////////

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64