make style

This commit is contained in:
Philippe Teuwen 2019-03-10 00:00:59 +01:00
parent 0d9223a547
commit 0373696662
483 changed files with 56514 additions and 52451 deletions

View file

@ -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;
}