Pseudorandom number generation: Difference between revisions

m
replaced: 0x → 0× (2)
No edit summary
m (replaced: 0x → 0× (2))
Line 10: Line 10:
Let ''Seed'' be a number between 0 and 0xFFFFFFFF or the ''Result'' of a previous call to the equation.
Let ''Seed'' be a number between 0 and 0xFFFFFFFF or the ''Result'' of a previous call to the equation.


''Result = [(0x41C64E6D * Seed) + 0x6073]''
''Result = [(0x41C64E6D * Seed) + 0×6073]''


This algorithm is used for the following:
This algorithm is used for the following:
Line 22: Line 22:
The game also uses a different algorithm to alternate, reroll, or modify a previously randomly generated value.  The algorithm works in the same nature, however the equation changes to:
The game also uses a different algorithm to alternate, reroll, or modify a previously randomly generated value.  The algorithm works in the same nature, however the equation changes to:


''Result = [(0x6C078965 * Seed) + 0x1]''
''Result = [(0x6C078965 * Seed) + 0×1]''


This algorithm is used for the following:
This algorithm is used for the following: