# rn1

rn1(x,y)

 Probability mass function of rn1(10,5)

Distribution
uniform

Mean
x − 12 + y

Standard deviation
sqrt(x2 − 112)

Not to be confused with rnl.
rn1(x, y)[1] is a pseudo-random number macro used in NetHack when a result should be unweighted. It is equivalent to rn2(x)&nbsp;+ y. The range of values is between y and y&nbsp;+ x&nbsp;−&nbsp;1 inclusive (that is, y&nbsp;≤ rn1(x,y)&nbsp;&lt; x&nbsp;+&nbsp;y). 
See also rn2.

References

↑ include/hack.h in NetHack 3.6.6, line 497