Core/Random: switch to 128bit engine and fully rely on its builtin seed initialization methods

This commit is contained in:
Ovahlord committed 2022-10-31 15:56:43 +01:00
1 parent 2e47ee3f4c
commit c6180d28c4
2 files changed
+2 -6

No files matched your search

+1 -5
View File
@@ -25,11 +25,7 @@
PCGRand::PCGRand()
{
std::random_device dev;
if (dev.entropy() > 0)
_state.seed(pcg_extras::seed_seq_from<std::random_device>());
else
_state.seed(uint64(time(nullptr)));
_state.seed(pcg_extras::seed_seq_from<std::random_device>());
}
uint32 PCGRand::RandomUInt32() // Output random bits
+1 -1
View File
@@ -40,7 +40,7 @@ public:
void operator delete[](void* ptr);
private:
pcg32 _state;
pcg64 _state;
};
#endif // PCGRand_h__