Update OneLoneCoder_PGE_ProcGen_Universe.cpp

This commit is contained in:
Javidx9 2020-05-12 17:27:14 +01:00 committed by GitHub
parent d638325430
commit 6bcd5fe7f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,7 @@
Author
~~~~~~
David Barr, aka javidx9, ©OneLoneCoder 2018, 2019, 2020
David Barr, aka javidx9, ©OneLoneCoder 2018, 2019, 2020
*/
@ -177,6 +177,9 @@ private:
return (rnd() % (max - min)) + min;
}
// Modified from this for 64-bit systems:
// https://lemire.me/blog/2019/03/19/the-fastest-conventional-random-number-generator-that-can-pass-big-crush/
// Now I found the link again - Also, check out his blog, it's a fantastic resource!
uint32_t rnd()
{
nProcGen += 0xe120fc15;