On Tue, Sep 4, 2012 at 10:13 PM, Regis d'Aubarede <[email protected]> wrote:
> A)  result=value<min ? min : (value > max ? max : value)
>
> B)
> result=value
> if value < min then result= min  end
> if value > max then result= max  end
>
> C)
> [min,max,value].sort[1]

"best" according to what metric?

Cheers

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/

-- You received this message because you are subscribed to the Google Groups 
ruby-talk-google 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 https://groups.google.com/d/forum/ruby-talk-google?hl=en

Reply via email to