Re: rand ()

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Thu, 6 Mar 2003 16:34:54 +0100, <tone.skoda at gmx.net> wrote:

>
> In documentation for rand (x1) function there says:
> "Return a random integer from 1 to x1"
>
> Can x1 be returned or not?

rand(x) returns integers in the inclusive range 1 to x.

> Is there some general rule which borders are included and which are
> excluded?
> Like for example with Rectangle (x1, x2, x3, x4).

No, there is no general (rational) rule.  The Windows Rectangle function is 
weird though. If you specify (left, top, right, bottom), it draws lines 
from [left,top] -> [right+1,top] -> [right+1,bottom+1] -> [left, bottom+1] - 
> [left,top]

Why they didn't make the parameters (left, top, width, height) is beyond my 
understanding.

-- 

cheers,
Derek Parnell

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu