From: Robert Klemme Date: 2006-11-15T01:35:05+09:00 Subject: Re: lib - generating a list of random number On 14.11.2006 17:09, Josselin wrote: > I try to generate an array of N random numbers in range between 2 > integers min and max > but I don't understand very well how to coordinate the sue of srand and > rand.. I am not sure I understand you here. What does "sue" mean here? > is there an already written function for that ? and btw is there any > place to find such useful functions ? What about this? >> def rand_seq(count, min, max) >> (1..count).map { rand(max-min) + min } >> end => nil >> rand_seq 10, -5, 5 => [2, -4, -2, -1, -3, 1, 1, 1, -3, 0] Kind regards robert