Hey all, using ruby 1.8.7, I wrote this:

500.times.map {  Integer((rand * 1) * 1000) / Float(1000) }

Basically, this gives me a list of 500 random decimal numbers that are
rounded to 3 places. However, I also want to make sure that all are
unique.

thanks for response

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to