Browse Source

refactor FpsCounter index increment

GitOrigin-RevId: f8c636747e
master
Colin McMillen 4 years ago
parent
commit
524ed70b9d
  1. 5
      Jumpy.Shared/FpsCounter.cs

5
Jumpy.Shared/FpsCounter.cs

@ -17,10 +17,7 @@ namespace Jumpy {
fps = 1000.0 * frameTimes.Length / timeElapsed;
}
frameTimes[idx] = now;
idx++;
if (idx == frameTimes.Length) {
idx = 0;
}
idx = (idx + 1) % frameTimes.Length;
}
}
}
Loading…
Cancel
Save