forget how to create random variable
#6

Quote:
Originally Posted by Tee
Посмотреть сообщение
Wrong topic.
It is the right topic.

OnTopic.

spedico used marcros to do a variable fast, easy and usefull.


pawn Код:
#define RandomEx(%0,%1) floatround(random((%1) - (%0)) + (%0))
That's more accurate.щ

Example:
pawn Код:
#define RandomEx(%0,%1) floatround(random((%1) - (%0)) + (%0))
    new result = RandomEx(10,100);
    printf(" result is %d ", result);
Reply


Messages In This Thread
forget how to create random variable - by leingod - 28.12.2011, 00:58
Re: forget how to create random variable - by spedico - 28.12.2011, 01:02
Re: forget how to create random variable - by leingod - 28.12.2011, 01:05
Re: forget how to create random variable - by Tee - 28.12.2011, 01:06
Re: forget how to create random variable - by leingod - 28.12.2011, 01:07
Re: forget how to create random variable - by TheArcher - 28.12.2011, 01:12
Re: forget how to create random variable - by Tee - 28.12.2011, 01:24
Re: forget how to create random variable - by Deathlane - 28.12.2011, 01:42
Re: forget how to create random variable - by TheArcher - 28.12.2011, 12:23
Re: forget how to create random variable - by Deathlane - 14.01.2012, 08:54

Forum Jump:


Users browsing this thread: 2 Guest(s)