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

Function sample

src/fl/gfx/sample.cpp.hpp:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace fl {
8
9CRGB sample(const CRGB *grid, const XYMap &xyMap, float x, float y,
10 SampleMode mode) {
11 if (mode == SampleMode::SAMPLE_BILINEAR) {
12 return sampleBilinear(grid, xyMap, x, y);
13 }
14 return sampleNearest(grid, xyMap, x, y);
15}
16
17CRGB sampleBilinear(const CRGB *grid, const XYMap &xyMap, float x, float y) {
18 int x0 = static_cast<int>(x);

Callers 2

build_lutFunction · 0.85
drawMethod · 0.85

Calls 2

sampleBilinearFunction · 0.85
sampleNearestFunction · 0.85

Tested by

no test coverage detected