MCPcopy Create free account
hub / github.com/FastLED/FastLED / setf

Method setf

src/fl/math/wave/wave_simulation.cpp.hpp:210–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void WaveSimulation2D::setf(fl::size x, fl::size y, float value) {
211 if (!has(x, y))
212 return;
213
214 value = fl::clamp(value, 0.0f, 1.0f);
215 i16 v16 = wave_detail::float_to_fixed(value);
216 seti16(x, y, v16);
217}
218
219void WaveSimulation2D::update() {
220 if (mUseChangeGrid) {

Callers

nothing calls this directly

Calls 5

hasFunction · 0.85
clampFunction · 0.85
float_to_fixedFunction · 0.85
maxFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected