Okay... here are some examples from Bryce, Shawn and Al
None of them meet the criteria though.
Code:
function Random($min, $max, optional $seed)
if $seed
srnd($seed)
endif
$random = rnd($max)
do
$random = rnd($max)
until $random >= $min and $random <= $max
Endfunction
Code:
function random($min, $max, optional $seed)
DIM $i, $burn, $nul
srnd((-1)*@ticks*(val($seed)+1))
$burn = rnd(50)
for $i = 1 to $burn
$nul = rnd($max)
next
$random = rnd($max)
while $random < $min or $random > $max
$random = rnd($max)
loop
endfunction
Code:
function random($min,optional $max)
dim $seed
do
$seed=@ticks
do
until $seed<>@ticks
SRND(IIF(@TICKS<0,(-(@TICKS*@msecs*7)),@TICKS*@MSECS*7))
$random=rnd($max)
until $random>=$min and $random<=$max
Endfunction
Code:
Function Randomize()
Dim $ticks $ticks = @ticks
If $ticks < 0
$ticks = -1 * $ticks
EndIf
SRND($ticks)
EndFunction