lib/knuth.rb
# rnd - returns an integer selected uniformly
# and pseudorandomly between upper and lower limits.
returns an integer selected uniformly
and pseudorandomly between upper and lower limits.
returns an integer selected uniformly and pseudorandomly between upper and lower limits .
def rnd(low, high)
    if low >= high
      low
    else
      i = (random * (high - low + 1) + low).truncate
      i > high ? high : i
    end
  end
def rnd ( low , high ) if low >= high low else i = ( random * ( high - low + 1 ) + low ) . truncate i > high ? high : i end end
rnd - returns an integer selected uniformly
and pseudorandomly between upper and lower limits.
rnd - returns an integer selected uniformly and pseudorandomly between upper and lower limits .
low
high