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

Method noExpand

src/fl/fx/2d/scale_up.cpp.hpp:76–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void ScaleUp::noExpand(fl::span<const CRGB> input, fl::span<CRGB> output, u16 width,
77 u16 height) {
78 u16 n = mXyMap.getTotal();
79 for (u16 w = 0; w < width; w++) {
80 for (u16 h = 0; h < height; h++) {
81 u16 idx = mXyMap.mapToIndex(w, h);
82 if (idx < n) {
83 output[idx] = input[w * height + h];
84 }
85 }
86 }
87}
88
89} // namespace fl

Callers

nothing calls this directly

Calls 2

getTotalMethod · 0.80
mapToIndexMethod · 0.45

Tested by

no test coverage detected