From: Daniel Moore on 19 Jun 2010 14:05 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Quiz: 1. Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this message was sent. 2. Support Ruby Quiz by submitting ideas and responses as often as you can. 3. Enjoy! Suggestion: A [QUIZ] in the subject of emails about the problem helps everyone on Ruby Talk follow the discussion. Please reply to the original quiz message, if you can. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RSS Feed: http://rubyquiz.strd6.com/quizzes.rss Suggestions?: http://rubyquiz.strd6.com/suggestions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ## Random Points within a Circle (#234) Greetings Rubyists, Generating random numbers is a useful feature and Ruby provides us with `Kernel.rand` to generate numbers uniformly distributed between zero and one. If we want to generate random numbers with other distributions, then we'll need to do a little work. The quiz this week is to generate random points uniformly distributed within a circle of a given radius and position. This quiz is relatively simple, great if you are new to Ruby or strapped for time. Remember, it is contributions from people like *you* that make Ruby Quiz succeed! Have fun! -- -Daniel http://rubyquiz.strd6.com
|
Pages: 1 Prev: General Ruby OOP question Next: Module vs Binding Evaluation |