lib/crypt-isaac.rb
# 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.
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.
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 .
def rand(*num)
      if (@randcnt == 1)
        isaac
        @randcnt = 256
      end
      @randcnt -= 1
      if num[0].to_i > 0
        @randrsl[@randcnt].modulo(num[0])
      else
        ".#{@randrsl[@randcnt]}".to_f
      end
    end
def rand ( * num ) if ( @randcnt == 1 ) isaac @randcnt = 256 end @randcnt -= 1 if num [ 0 ] . to_i > 0 @randrsl [ @randcnt ] . modulo ( num [ 0 ] ) else ".#{@randrsl[@randcnt]}" . to_f end end
Works just like the standard rand() function.
Works just like the standard rand () function .
num
<not_specific>