Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechpavlu committed May 25, 2024
1 parent f0689d9 commit 9394dcf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/random/randomizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ export const useRandomizer = (name: RandomizerName): void => {
RANDOMIZER = getRandomizer(name);
};

/**
* Implementation of Linear congruential generator to enable
* seeding the pseudo-randomization.
*/
export const useSeed = (seed: number): void => {
RANDOMIZER = () => {
seed = (seed * 9301 + 49297) % 233280;
Expand Down

0 comments on commit 9394dcf

Please sign in to comment.