Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype TCODRandom = TCODRandom {
- unTCODRandom :: Ptr ()
- data Dice = Dice {
- diceNbRolls :: !Int
- diceNbFaces :: !Int
- diceMultiplier :: !Double
- diceAddSub :: !Double
- data RandomAlgorithm
- data Distribution
Documentation
newtype TCODRandom Source #
Reference to TCOD pseudo random generator
TCODRandom | |
|
Dice roll
Dice | |
|
data RandomAlgorithm Source #
Pseudo random number algorithm
data Distribution Source #
Random number distribution laws
DistributionLinear | This is the default distribution. It will return a number from a range min-max. The numbers will be evenly distributed, ie, each number from the range has the exact same chance of being selected. |
DistributionGaussian | This distribution does not have minimum and maximum values. Instead, a mean and a standard deviation are used. The mean is the central value. It will appear with the greatest frequency. The farther away from the mean, the less the probability of appearing the possible results have. Although extreme values are possible, 99.7% of the results will be within the radius of 3 standard deviations from the mean. So, if the mean is 0 and the standard deviation is 5, the numbers will mostly fall in the (-15,15) range. |
DistributionGaussianRange | This one takes minimum and maximum values. Under the hood, it computes the mean (which falls right between the minimum and maximum) and the standard deviation and applies a standard Gaussian distribution to the values. The difference is that the result is always guaranteed to be in the min-max range. |
DistributionGaussianInverse | Essentially, this is the same as |
DistributionGaussianRangeInverse | Essentially, this is the same as |