clear method

void clear(
  1. double v
)

Implementation

void clear(double v) {
  data.clear();
  for (int i = 0; i < size; i++) {
    data.add(v);
  }
  average = v;
  dirty = false;
}