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

Method set

src/fl/math/wave/wave_simulation_real.cpp.hpp:118–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116bool WaveSimulation1D_Real::has(fl::size x) const { return (x < length); }
117
118void WaveSimulation1D_Real::set(fl::size x, float value) {
119 if (x >= length) {
120 FL_WARN("warning X value too high");
121 return;
122 }
123 i16 *curr = (whichGrid == 0) ? grid1.data() : grid2.data();
124 curr[x + 1] = wave_detail::float_to_fixed(value);
125}
126
127void WaveSimulation1D_Real::update() {
128 i16 *curr = (whichGrid == 0) ? grid1.data() : grid2.data();

Callers 1

setfMethod · 0.45

Calls 2

float_to_fixedFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected