Core/Random: switch to 128bit engine and fully rely on its builtin seed initialization methods
This commit is contained in:
1 parent
2e47ee3f4c
commit
c6180d28c4
2 files changed
+2
-6
No files matched your search
@@ -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
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
void operator delete[](void* ptr);
|
||||
private:
|
||||
|
||||
pcg32 _state;
|
||||
pcg64 _state;
|
||||
};
|
||||
|
||||
#endif // PCGRand_h__
|
||||
Reference in new issue
Block a user