C
copx
What's a good name for a random number function which
receives an int (n) and returns a random int
(uniform distribution) 0..n-1?
That's quite useful in C. For example to choose a random
array element like:
element = array[rng_n(ARRAY_SIZE)]
rng_n() is the current name of my function, I am trying
to find a more meaningful name...
receives an int (n) and returns a random int
(uniform distribution) 0..n-1?
That's quite useful in C. For example to choose a random
array element like:
element = array[rng_n(ARRAY_SIZE)]
rng_n() is the current name of my function, I am trying
to find a more meaningful name...