docs: @Override
      public void noteValue(double val) {
          super.noteValue(val);
          buf[insertPos++] = val;
          if (insertPos >= buf.length) {
              insertPos = 0;
              size = buf.length;
          } else if (insertPos > size) {
              size = insertPos;
          }
      }