| 116 | bool WaveSimulation1D_Real::has(fl::size x) const { return (x < length); } |
| 117 | |
| 118 | void 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 | |
| 127 | void WaveSimulation1D_Real::update() { |
| 128 | i16 *curr = (whichGrid == 0) ? grid1.data() : grid2.data(); |
no test coverage detected