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

◆ setf()

void fl::WaveSimulation2D::setf ( size_t x,
size_t y,
float value )

Definition at line 189 of file wave_simulation.cpp.

189 {
190 if (!has(x, y))
191 return;
192
193 value = fl::clamp(value, 0.0f, 1.0f);
194 int16_t v16 = wave_detail::float_to_fixed(value);
195 seti16(x, y, v16);
196}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:83
void seti16(size_t x, size_t y, int16_t value)
bool has(size_t x, size_t y) const
int16_t float_to_fixed(float f)
FASTLED_FORCE_INLINE T clamp(T value, T min, T max)
Definition clamp.h:10

References fl::clamp(), fl::wave_detail::float_to_fixed(), has(), seti16(), x, and y.

+ Here is the call graph for this function: