diff options
author | Florian Jung <flo@windfisch.org> | 2015-01-08 13:21:38 +0100 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-01-08 13:21:38 +0100 |
commit | 1bf000423365bcaa12e2ef801b2ecd3f7ab764bf (patch) | |
tree | 1d81222e08f1bbb5ed146a577708275dd37d831b /ringbuf.h | |
parent | 1b7c9b6e2eb89e2d17fd0b76d3e3f51308dbc37a (diff) |
ringbufs, data fusion
Diffstat (limited to 'ringbuf.h')
-rw-r--r-- | ringbuf.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -123,4 +123,12 @@ class ModuloRingbuffer { rb->set(_fixup_range(val)); } + + void add(double val) + { + rb->add(val); + + while (get() < low) rb->add(span); + while (get()>= upp) rb->add(-span); + } }; |