Mega Code Archive
Categories
/
Ruby
/
Development
Random seeds
srand(0) # Known seed [rand(100),rand(100)] # => [44,47]: pseudorandom sequence srand(0) # Reset the seed to repeat the sequence [rand(100),rand(100)] # => [44,47]