diff options
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); + } }; |