Hey,
Ive gone a bit dim and for the life of me cant think of the best way to do this...
Im trying to work out the fastest way of working out 1 in 10000 chance. I was originally thinking of using an int and doing a rand like shown below:
$intRand = ($intRandomRate, 10000);
if($intRand ==10000)
{return true;}
else
{return false;}
Now that first of all looked fast and simple to do, but when i set the random rate to 99999, it just doesnt feel like a 99.99% rate... if anything it feels like a 50% rate. This is most likely because even if you do have rand(99999,10000) it still has a 50% chance of being 10000...
SO i need to think of a decent way of having a float or int to designate the random rate and it to be able to handle anything from 0.01% to 99.99%...
I hope my explanations not too stupid...