Fix juice stream generates tiny droplet at tick time

This commit is contained in:
ekrctb 2019-01-25 18:11:27 +09:00
parent 67ea3beeb4
commit 3375096f1d
1 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,8 @@ private void createTicks()
while (tinyTickInterval > 100)
tinyTickInterval /= 2;
for (double t = lastTickTime + tinyTickInterval; t < time; t += tinyTickInterval)
// we don't want to generate at (t == time - epsilon) due to floating point accuracy. time - 1 seems working.
for (double t = lastTickTime + tinyTickInterval; t < time - 1; t += tinyTickInterval)
{
double progress = reversed ? 1 - (t - spanStartTime) / spanDuration : (t - spanStartTime) / spanDuration;