rnd

From NetHackWiki
Jump to navigation Jump to search
rnd(x)
Probability mass function of rnd(10).
Distribution uniform
Mean (x+1)/2
Standard deviation (x21)/12

rnd(x)[1] is a pseudo-random number function used in NetHack when a result should be unweighted. The range of values is between 1 and x inclusive (that is, 1 ≤ rnd(x) ≤ x). It is equivalent to rolling a die with x sides.

References

This page is a stub. Should you wish to do so, you can contribute by expanding this page.