Quick Question: 50% Chance of something
Easy question. Would this be the correct away of getting a "50% chance" of something happening?
Code:
|
Re: Quick Question: 50% Chance of something
I would do
PHP Code:
|
Re: Quick Question: 50% Chance of something
Well 50% chance would be random( 100 )
because 5 of 10 would happen more than 50 of 100 and ofcourse 1 of 2, thats what i think |
Re: Quick Question: 50% Chance of something
Well...technically, it should be a 50/50 chance as this. However, as xPaw pointed out, the more times you run the same test, the higher the likelihood of the outcome being closer to what was expected.
|
Re: Quick Question: 50% Chance of something
set a booleen, then do a random which can be 1 or 0.
thats 50% chance |
Re: Quick Question: 50% Chance of something
Quote:
But, I use this for clarity: PHP Code:
|
Re: Quick Question: 50% Chance of something
Sweet. Thanks guy's.
|
| All times are GMT -4. The time now is 14:43. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.