forked from OpenWF/SpaceNinjaServer
note what the RNG classes are for
This commit is contained in:
parent
b32de0711b
commit
2af671223e
@ -70,6 +70,7 @@ export const getRandomWeightedRewardUc = <T extends { Rarity: TRarity }>(
|
|||||||
return getRandomReward(resultPool);
|
return getRandomReward(resultPool);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Seeded RNG for internal usage. Based on recommendations in the ISO C standards.
|
||||||
export class CRng {
|
export class CRng {
|
||||||
state: number;
|
state: number;
|
||||||
|
|
||||||
@ -93,6 +94,7 @@ export class CRng {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Seeded RNG for cases where we need identical results to the game client. Based on work by Donald Knuth.
|
||||||
export class SRng {
|
export class SRng {
|
||||||
state: bigint;
|
state: bigint;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user