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

◆ setf()

void fl::WaveSimulation1D::setf ( fl::size x,
float value )

Definition at line 332 of file wave_simulation.cpp.

332 {
333 if (!has(x))
334 return;
335 value = fl::clamp(value, -1.0f, 1.0f);
336 u8 mult = MAX(1, mMultiplier);
337 for (u32 i = 0; i < mult; ++i) {
338 mSim->set(x * mult + i, value);
339 }
340}
int x
Definition simple.h:92
fl::unique_ptr< WaveSimulation1D_Real > mSim
bool has(fl::size x) const
#define MAX(a, b)
Definition math_macros.h:37
unsigned char u8
Definition int.h:17
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition clamp.h:10

References fl::clamp(), has(), MAX, mMultiplier, mSim, and x.

+ Here is the call graph for this function: