make style
This commit is contained in:
@@ -13,18 +13,21 @@ static uint32_t g_nextrandom;
|
||||
* https://software.intel.com/en-us/articles/fast-random-number-generator-on-the-intel-pentiumr-4-processor/
|
||||
*/
|
||||
|
||||
inline void fast_prand(){
|
||||
inline void fast_prand()
|
||||
{
|
||||
fast_prandEx(GetTickCount());
|
||||
}
|
||||
inline void fast_prandEx(uint32_t seed) {
|
||||
inline void fast_prandEx(uint32_t seed)
|
||||
{
|
||||
g_nextrandom = seed;
|
||||
}
|
||||
|
||||
uint32_t prand() {
|
||||
uint32_t prand()
|
||||
{
|
||||
// g_nextrandom *= 6364136223846793005;
|
||||
// g_nextrandom += 1;
|
||||
//return (uint32_t)(g_nextrandom >> 32) % 0xffffffff;
|
||||
g_nextrandom = (214013 * g_nextrandom + 2531011);
|
||||
return (g_nextrandom>>16) & 0xFFFF;
|
||||
return (g_nextrandom >> 16) & 0xFFFF;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user