Some random numbers based on process number and current time : rand « Development « Ruby






Some random numbers based on process number and current time


rand(1000)                         # => 187
rand(1000)                         # => 551
rand(1000)                         # => 911

 








Related examples in the same category

1.Generating Random Numbers
2.Random with a range
3.Get a random item in an array
4.Get a random value in a hash
5.Generate random numbers
6.Start the seed with the number 1