Create a random number generator with the seed passed in
seed number optional, default 123456789Starting seed, 0 as an integer uses the default seed
let r = new RandomGenerator(123); // random number generator with seed 123
let a = r.float(); // random value between 0 and 1
let b = r.int(10); // random integer between 0 and 9
r.seed = 123; // reset the seed
let c = r.float(); // the same value as a
random seed, set it to reseed
Returns a random angle between -PI and PI
Randomly returns true or false given the chance of true passed in
chance number optional, default 0.5
Returns a seeded Vector2 pointing a random way with the length passed in, the twin of randVec2
length number optional, default 1
Returns a seeded random value between the two values passed in
valueA number optional, default 1valueB number optional, default 0
Returns a seeded random value between the two values passed in with a random sign
valueA number optional, default 1valueB number optional, default 0
Returns a floored seeded random value between the two values passed in
valueA numbervalueB number optional, default 0
Returns a new color that has each component randomly adjusted
color Coloramount number optional, default 0.05alphaAmount number optional, default 0
Returns a random color between the two passed in colors, combine components if linear
colorA Color optional, default WHITEcolorB Color optional, default BLACKlinear boolean optional, default false
Randomly returns either -1 or 1 deterministically
Returns a seeded vec2 with each component between the two values passed in
- A point in a square, not a random direction like randVec2, see direction for that
valueA number optional, default 1valueB number optional, default 0