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

◆ setf()

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

Definition at line 185 of file wave_simulation.cpp.

185 {
186 if (!has(x, y))
187 return;
188
189 value = fl::clamp(value, 0.0f, 1.0f);
190 int16_t v16 = wave_detail::float_to_fixed(value);
191 seti16(x, y, v16);
192}
int y
Definition Audio.ino:72
int x
Definition Audio.ino:71
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: