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

◆ getu8()

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

Definition at line 126 of file wave_simulation.cpp.

126 {
127 int16_t value = geti16(x, y);
128 if (mSim->getHalfDuplex()) {
129 uint16_t v2 = static_cast<uint16_t>(value);
130 switch (mU8Mode) {
132 return half_duplex_blend_linear(v2);
135 }
136 }
137 return static_cast<uint8_t>(((static_cast<uint16_t>(value) + 32768)) >> 8);
138}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:83
int16_t geti16(size_t x, size_t y) const
fl::scoped_ptr< WaveSimulation2D_Real > mSim
U8EasingFunction mU8Mode
@ WAVE_U8_MODE_LINEAR
@ WAVE_U8_MODE_SQRT

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

+ Here is the call graph for this function: