< :the previous in number
^ :the list in numerical order
> :the next in number
P :the previous (in thread)
N :the next article (the next thread)
|<:the top of this thread
>|:the next thread
^ :the parent (reply-to)
_:the child (an article replying to this)
>:the elder article having the same parent
<:the youger article having the same parent
---:split window and show thread lists
| :split window (vertically) and show thread lists
~ :close the thread frame
.:the index
..:the index of indices
Thanks Matthew, didn't know that about 2.0.
Cheers,
Robert
On Thu, Mar 7, 2013 at 12:21 PM, Matthew Kerwin <matthew / kerwin.net.au>wrote:
> On 7 March 2013 17:55, Robert Feldt <robert.feldt / gmail.com> wrote:
>
>>
>> Random#rand and Kernel#rand are exclusive i.e. they return a value >= 0.0
>> but <max if max is a Float. What if one wants a rand that is inclusive of
>> the max?
>>
>
> I'm back at a computer now, and have looked up the docs for Random#rand.
> Apparently in 2.0 you can simply pass an inclusive range and it will do
> what you want, e.g.: Random.rand(0.0..max) <
> http://ruby-doc.org/core-2.0/Random.html#method-i-rand>
>
> However in 1.9, yeah, your rand_incl2 is basically what I'd do. I
> independently came up with a simplified version:
> https://gist.github.com/phluid61/5107356
>
--
Best regards,
/Robert Feldt
--
Tech. Dr. (PhD), Assoc. Professor in Software Engineering
Chalmers, Software Engineering Dept
Blekinge Institute of Technology, Software Engineering Research Lab
robert.feldt (a) chalmers.se or robert.feldt (a) gmail.com
Mobile phone: +46 (0) 733 580 580
http://www.cse.chalmers.se/~feldt