Quote:
Originally Posted by jim_yang
I suggest random 0-10000 and check if less than 100 for 1% chance
or random float from 0 to 1 and check the percent directly
|
There's absolutely no difference. Any method will work. The chances are matematically the same. But it gets easier to read if you use numbers equal to the chance you are trying to achieve.
You could do,for example, random_num(1,400) and check if it's equal to one, or random_num(1,800) and check if its <= 2. Which one is easier to figure out?