Setting min-max number
#2

Its not hard, just do it like this:
new rnd = random((MAX_VALUE - MIN_VALUE)) + MIN_VALUE;

or use this define:

#define randommin(%1, %2) random(%1 - %2) + %2


untested
Reply


Messages In This Thread
Setting min-max number - by WillyP - 07.12.2010, 14:49
Re: Setting min-max number - by Mauzen - 07.12.2010, 14:54
Re: Setting min-max number - by WillyP - 07.12.2010, 14:59
Re: Setting min-max number - by woot - 07.12.2010, 15:03
Re: Setting min-max number - by WillyP - 07.12.2010, 15:09

Forum Jump:


Users browsing this thread: 1 Guest(s)