B prev next
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

<< RANDOM DISTRIBUTIONS >>

Uniform (flat) Distribution

If R is a random real number in the range [0,1]
and if A and B are real numbers, and M and N are integer numbers, then the value

A + (B-A)*R

will be random real number in the range [A,B], and

M + INT(N*R)

will be random integer number in the range [M,N].

For example, to generate uniform integer random distribution between [1,6] you can use:

Dice = 1 + INT(6*R)