Use chrono::duration for animation frame durations.
This commit is contained in:
parent
d81e127686
commit
5b509c277a
4 changed files with 53 additions and 12 deletions
7
rand.cpp
7
rand.cpp
|
|
@ -3,4 +3,11 @@
|
|||
namespace Random {
|
||||
std::random_device RNG;
|
||||
std::mt19937 GENERATOR(RNG());
|
||||
|
||||
|
||||
std::chrono::milliseconds milliseconds(int from, int to) {
|
||||
int tick = Random::uniform_real(float(from), float(to));
|
||||
return std::chrono::milliseconds{tick};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue