diff --git a/Jumpy.Shared/FpsCounter.cs b/Jumpy.Shared/FpsCounter.cs index f811b2a..2fad62c 100644 --- a/Jumpy.Shared/FpsCounter.cs +++ b/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; } } }