I wrote something that i think describes better the Rnd().
If you like it you can use or modify it for the wiki.
Float = Rnd ( [ Min [ , Max ] )
Compute a pseudo-random floating point number between a lower Min limit
value
hm... i think i have got it.
The function accepts two parameters
Rnd ( [ Min [ , Max ] )
the Min param and the Max param.
if we pass only one param it takes as first argument, so it is the Min
argument
BUT BUT BUT... it uses it as Max value, as upper limit, because the
lower limit by default i
On Thu, 2010-11-25 at 14:26 +0100, Fabien Bodard wrote:
> if i wrote that like a function ...
>
> rnd(min as float, max as float)
>
> the variable named min don't change his name
>
> i think benoit should take others name than min/max
i am not confused about min, max, i understand that these ar
if i wrote that like a function ...
rnd(min as float, max as float)
the variable named min don't change his name
i think benoit should take others name than min/max
val1/val2 ?
Float = Rnd ( [ Val1 [ , Val2 ] )
* If no parameters is specified, returns a pseudo-random number in the
interva
Yes the first argument is the Min and the second is the Max.
But if i pass one argument
PRINT Rnd(2)
this is equal
PRINT Rnd(0, 2)
so one argument is the Max parameter
and the range is
[0, 2] where 2=Max
in example that is said
' Between 0 and 2
PRINT Rnd(2)
so
* If only one parameter is
> For one parameter you still have
>
> * If only one parameter is specified, returns a pseudo-random in the
> interval [ 0 , Min [.
>
> i think is
>
> * If only one parameter is specified, returns a pseudo-random in the
> interval [ 0 , Max [.
>
> and something else what does it mean
> 0, Max [
For one parameter you still have
* If only one parameter is specified, returns a pseudo-random in the
interval [ 0 , Min [.
i think is
* If only one parameter is specified, returns a pseudo-random in the
interval [ 0 , Max [.
and something else what does it mean
0, Max [.
?
isn't it [0, Max]
> In wiki the page http://gambasdoc.org/help/lang/rnd?show
>
> i think in these parts is hard read.
>
> * If no parameters is specified, returns a pseudo-random number in the
> interval [ 0 , 1 [.
> * If the one parameter is specified, returns a pseudo-random in the
> interval [ 0 , Min [
In wiki the page http://gambasdoc.org/help/lang/rnd?show
i think in these parts is hard read.
* If no parameters is specified, returns a pseudo-random number in the
interval [ 0 , 1 [.
* If the one parameter is specified, returns a pseudo-random in the
interval [ 0 , Min [.
* If the two