for (timeSinceLastUpdate += timePassed; timeSinceLastUpdate > 10D; ) { timeSinceLastUpdate -= 10D;
timeSinceLastUpdate += timePassed; int particlesToCreate = 0; if (controlFlow) particlesToCreate = (int) ( (float) releaseRate * timeSinceLastUpdate * .001f * (1.0f + releaseVariance * (FastMath.nextRandomFloat() - 0.5f)));  if (controlFlow && particlesToCreate <= 0) particlesToCreate = 1;  if (controlFlow && releaseRate - released <= 0) particlesToCreate = 0;  for (; timeSinceLastUpdate > 10d; ) { timeSinceLastUpdate -= 10d;
  public void updateParticles() {    Vector3f speed = new Vector3f();    boolean flag = false;    currentTime = getTimerTic();    timePassed = currentTime - previousTime;    for (timeSinceLastUpdate += timePassed; timeSinceLastUpdate > 10D; ) {      timeSinceLastUpdate -= 10D;      flag = true;      if (firstRun) {        timeSinceLastUpdate = 0.0D;        firstRun = false;      }      int i = 0;      while (i < noParticles) {        if (particles[i].updateAndCheck()) {          getRandomSpeed(speed);          particles[i].recreateParticle(speed, getRandomLifeSpan());          switch (getGeometry()) {            case 1:              particles[i].location.set(getLine().random());              break;            case 2:              particles[i].location.set(getRectangle().random());              break;            default:              particles[i].location.set(originCenter);              break;          }          particles[i].updateVerts();        }        i++;      }    }    if (flag) {      particlesGeometry.setVertices(geometryCoordinates);      particlesGeometry.setColors(appearanceColors);    }    previousTime = currentTime;  }