Module

Jack.Seed

Package
purescript-jack
Repository
jystic/purescript-jack

#Seed Source

data Seed

Splittable random number generator.

#mkSeed Source

mkSeed :: Int -> Seed

Create a new 'Seed' from a 32-bit integer.

#randomSeed Source

randomSeed :: forall e. Eff (random :: RANDOM | e) Seed

Create a random 'Seed' using the system random number generator.

#nextMin Source

nextMin :: Int

The smallest possible value returned from 'next'.

#nextMax Source

nextMax :: Int

The largest possible value returned from 'next'.

#nextSeed Source

nextSeed :: Seed -> Tuple Int Seed

Returns the next pseudo-random number in the sequence, and a new seed.

#nextInt53 Source

nextInt53 :: Int53 -> Int53 -> Seed -> Tuple Int53 Seed

Generate a random 'Int53' in the specified range. /Note this is not safe when (hi - lo) > 53-bits./

#splitSeed Source

splitSeed :: Seed -> Tuple Seed Seed

Splits a random number generator in to two.