Dermot Moynihan wrote:
> Thanks Jeroen.
>
> Been doing a bit of reading on 'ceil' and 'floor' and am wondering if
> you have to know the actual number you are going to be working on in
> order to use them. Because I don't know what that number will be. Did
> you skim read that post - I gave some examples to try to make that
> point. Or have I just misunderstood how to use 'ceil' or 'floor'.
>   
No, you don't need to know the number in advance.

Here's the doc for the ceil method. Look at the first two examples. Can 
you think of any numbers for which it will not do what you need?

ruby$ ri Float#ceil
------------------------------------------------------------- Float#ceil
     flt.ceil    => integer
------------------------------------------------------------------------
     Returns the smallest Integer greater than or equal to flt.

        1.2.ceil      #=> 2
        2.0.ceil      #=> 2
        (-1.2).ceil   #=> -1
        (-2.0).ceil   #=> -2