mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +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)
|
||||
{
|
||||
randomseed += 7069;
|
||||
randomseed ^= randomseed << 17;
|
||||
randomseed ^= randomseed >> 9;
|
||||
randomseed *= 373;
|
||||
randomseed ^= randomseed >> 13;
|
||||
randomseed ^= randomseed >> 11;
|
||||
randomseed ^= randomseed << 21;
|
||||
randomseed ^= randomseed >> 15;
|
||||
return (randomseed&((FRACUNIT-1)<<9))>>9;
|
||||
return ( (randomseed*36548569) >> 4) & (FRACUNIT-1);
|
||||
}
|
||||
|
||||
/** Provides a random fixed point number. Distribution is uniform.
|
||||
|
|
Loading…
Reference in a new issue