1. rand ()
- Posted by tone.skoda at gmx.net Mar 06, 2003
- 402 views
In documentation for rand (x1) function there says: "Return a random integer from 1 to x1" Can x1 be returned or not? Is there some general rule which borders are included and which are excluded? Like for example with Rectangle (x1, x2, x3, x4).
2. Re: rand ()
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 07, 2003
- 430 views
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