RepeatableRandom constructor

RepeatableRandom([
  1. Random prngFromSeed(
    1. int?
    ) = math.Random.new
])

Constructor.

prngFromSeed is a callback that constructs a math.Random from a seed. If not specified, defaults to math.Random.new.

Implementation

RepeatableRandom([math.Random Function(int?) prngFromSeed = math.Random.new])
    : _prngFromSeed = prngFromSeed;