mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Simplicity is a virute... don't overcomplicate things.
This commit is contained in:
parent
a3e940fe65
commit
3dc4cfc229
1 changed files with 3 additions and 6 deletions
|
@ -95,13 +95,10 @@ static UINT32 initialseed = 0;
|
||||||
*/
|
*/
|
||||||
ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void)
|
ATTRINLINE static fixed_t FUNCINLINE __internal_prng__(void)
|
||||||
{
|
{
|
||||||
randomseed += 7069;
|
randomseed ^= randomseed >> 13;
|
||||||
randomseed ^= randomseed << 17;
|
randomseed ^= randomseed >> 11;
|
||||||
randomseed ^= randomseed >> 9;
|
|
||||||
randomseed *= 373;
|
|
||||||
randomseed ^= randomseed << 21;
|
randomseed ^= randomseed << 21;
|
||||||
randomseed ^= randomseed >> 15;
|
return ( (randomseed*36548569) >> 4) & (FRACUNIT-1);
|
||||||
return (randomseed&((FRACUNIT-1)<<9))>>9;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Provides a random fixed point number. Distribution is uniform.
|
/** Provides a random fixed point number. Distribution is uniform.
|
||||||
|
|
Loading…
Reference in a new issue