addLast method

double addLast(
  1. int amt
)

Implementation

double addLast(int amt) {
  double f = 0;

  for (int i = 0; i < min(data.length, amt); i++) {
    f += data[i];
  }

  return f;
}