setReplenishPercentage method

void setReplenishPercentage(
  1. double percentage
)

Set the percentage of the pool to replenish on empty. Valid values are between 0.00f and 1.00f

@param percentage a value between 0 and 1, representing the percentage of the pool to replenish.

Implementation

void setReplenishPercentage(double percentage) {
  double p = percentage;
  if (p > 1) {
    p = 1;
  } else if (p < 0) {
    p = 0;
  }
  this.replenishPercentage = p;
}