def rand(arg = nil)
      if @randcnt == 1
        isaac
        @randcnt = 256
      end
      @randcnt -= 1
      if arg.nil?
        (@randrsl[@randcnt] / 536_870_912.0) % 1
      elsif arg.is_a?(Integer)
        @randrsl[@randcnt] % arg
      elsif arg.is_a?(Range)
        arg.min + @randrsl[@randcnt] % (arg.max - arg.min)
      else
        @randrsl[@randcnt] % arg.to_i
      end
    end
def rand(arg = nil)
      if @randcnt == 1
        isaac
        @randcnt = 256
      end
      @randcnt -= 1
      if arg.nil?
        (@randrsl[@randcnt] / 536_870_912.0) % 1
      elsif arg.is_a?(Integer)
        @randrsl[@randcnt] % arg
      elsif arg.is_a?(Range)
        arg.min + @randrsl[@randcnt] % (arg.max - arg.min)
      else
        @randrsl[@randcnt] % arg.to_i
      end
    end
Works just like the standard rand() function.  If called with an
 integer argument, rand() will return positive random number in
 the range of 0 to (argument - 1).  If called without an integer
 argument, rand() returns a positive floating point number less than 1.
 If called with a Range, returns a number that is in the range.