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

Function fill_deterministic

tests/fl/gfx/blur.cpp:609–615  ·  view source on GitHub ↗

Helper: fill pixel arrays with deterministic test data.

Source from the content-addressed store, hash-verified

607
608// Helper: fill pixel arrays with deterministic test data.
609static void fill_deterministic(CRGB *pixels, int n) {
610 for (int i = 0; i < n; ++i) {
611 pixels[i] = CRGB(static_cast<uint8_t>((i * 37 + 17) & 0xFF),
612 static_cast<uint8_t>((i * 59 + 31) & 0xFF),
613 static_cast<uint8_t>((i * 83 + 47) & 0xFF));
614 }
615}
616
617FL_TEST_CASE("CanvasMapped 3x3 - uniform interior unchanged") {
618 const int W = 5, H = 5;

Callers 1

blur.cppFile · 0.85

Calls 1

CRGBClass · 0.50

Tested by

no test coverage detected