refactor FpsCounter index increment
GitOrigin-RevId: f8c636747e4ab2cc8e99378e525ab2cde70cadb6
This commit is contained in:
parent
80b6e2ac5c
commit
524ed70b9d
@ -17,10 +17,7 @@ namespace Jumpy {
|
|||||||
fps = 1000.0 * frameTimes.Length / timeElapsed;
|
fps = 1000.0 * frameTimes.Length / timeElapsed;
|
||||||
}
|
}
|
||||||
frameTimes[idx] = now;
|
frameTimes[idx] = now;
|
||||||
idx++;
|
idx = (idx + 1) % frameTimes.Length;
|
||||||
if (idx == frameTimes.Length) {
|
|
||||||
idx = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user