FastLED 3.9.15
Loading...
Searching...
No Matches

◆ getu8()

uint8_t fl::WaveSimulation2D::getu8 ( size_t x,
size_t y ) const

Definition at line 109 of file wave_simulation.cpp.

109 {
110 int16_t value = geti16(x, y);
111 if (sim->getHalfDuplex()) {
112 uint16_t v2 = static_cast<uint16_t>(value);
113 switch (mU8Mode) {
115 return half_duplex_blend_linear(v2);
118 }
119 }
120 return static_cast<uint8_t>(((static_cast<uint16_t>(value) + 32768)) >> 8);
121}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:81
int16_t geti16(size_t x, size_t y) const
fl::scoped_ptr< WaveSimulation2D_Real > sim
U8EasingFunction mU8Mode
@ WAVE_U8_MODE_LINEAR
@ WAVE_U8_MODE_SQRT

References geti16(), mU8Mode, sim, fl::WAVE_U8_MODE_LINEAR, fl::WAVE_U8_MODE_SQRT, x, and y.

+ Here is the call graph for this function: