Add method for reliable identification of mid value for angle buffer values to RingBuffer; fix getMedian()

This commit is contained in:
Ulrich Meine
2026-07-04 18:27:19 +02:00
parent 92ee3a0c4f
commit 53cf497a70
2 changed files with 76 additions and 6 deletions
+2
View File
@@ -80,6 +80,8 @@ public:
double getMax(size_t amount) const; // Get maximum value of the last <amount> values of buffer
double getMid() const; // Get mid value between <min> and <max> value in buffer
double getMid(size_t amount) const; // Get mid value between <min> and <max> value of the last <amount> values of buffer
double getCircularMid() const; // Get mid value of circle (degree) values of buffer
double getCircularMid(size_t amount) const; // Get mid value of circle (degree) values of the last <amount> values of buffer
double getMedian() const; // Get the median value in buffer
double getMedian(size_t amount) const; // Get the median value of the last <amount> values of buffer
size_t getCapacity() const; // Get the buffer capacity (maximum size)