I know I'm being quite pedantic here. But, what is the right way to get a true 50/50-chance with a generated random number? Say, to simulate the flip of a coin.
This is what I mean:
Which of these two is the right one?Code:Randomize() If Rnd() > .5 Then Debug.Print("Heads") Else Debug.Print("Tails") If Rnd() >= .5 Then Debug.Print("Heads") Else Debug.Print("Tails")
I know this difference is close to nothing, but I'm doing some calculations on bell curves, in such a way that it requires true 50/50-chance.
Thanks for any help,
Alexander.




Reply With Quote