advance method

void advance(
  1. double factor,
  2. double V,
  3. double endValue
)

Implementation

void advance(double factor, double V, double endValue) {
  double f = 0.toDouble();
  double normalization = factor / endValue;
  if (normalization < life || normalization > 1.toDouble() - overflow) {
    alpha = 0.toDouble();
    return;
  }
  normalization = (normalization - life) / (1.toDouble() - life - overflow);
  double f2 = normalization * endValue;
  if (normalization >= 0.7.toDouble()) {
    f = (normalization - 0.7.toDouble()) / 0.3.toDouble();
  }
  // alpha = 1.toDouble() - f;
  alpha = 1;
  f = bottom * f2;
  cx = baseCx + f * 3;
  cy = (baseCy - neg * pow(f, 2.0)).toDouble() - f * mag;
  radius = V + (baseRadius - V) * f2;
}