Added a default value (0.5) to method flip

This commit is contained in:
evomarc 2000-11-05 04:50:10 +00:00
commit 0642954035

View file

@ -151,7 +151,7 @@ public :
flip() tosses a biased coin such that flip(x/100.0) will flip() tosses a biased coin such that flip(x/100.0) will
returns true x% of the time returns true x% of the time
*/ */
bool flip(float bias) bool flip(float bias=0.5)
{ {
return uniform() < bias; return uniform() < bias;
} }