| 7 | namespace fl { |
| 8 | |
| 9 | CRGB 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 | |
| 17 | CRGB sampleBilinear(const CRGB *grid, const XYMap &xyMap, float x, float y) { |
| 18 | int x0 = static_cast<int>(x); |
no test coverage detected