MCPcopy Create free account
hub / github.com/FastLED/FastLED / minMax

Method minMax

src/fl/math/grid.h:38–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 }
37
38 vec2<T> minMax() const {
39 T minValue = mData[0];
40 T maxValue = mData[0];
41 for (u32 i = 1; i < mWidth * mHeight; ++i) {
42 if (mData[i] < minValue) {
43 minValue = mData[i];
44 }
45 if (mData[i] > maxValue) {
46 maxValue = mData[i];
47 }
48 }
49 // *min = minValue;
50 // *max = maxValue;
51 vec2<T> out(minValue, maxValue);
52 return out;
53 }
54
55 T &at(u32 x, u32 y) { return access(x, y); }
56 const T &at(u32 x, u32 y) const { return access(x, y); }

Callers 2

updateMethod · 0.80
grid.hppFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected