PeterO.RandomGenerator.Bernoulli C# (CSharp) Méthode

Bernoulli() public méthode

Returns either true or false at a 50% chance each.
public Bernoulli ( ) : bool
Résultat bool
        public bool Bernoulli()
        {
            return this.UniformInt(2) == 0;
        }

Same methods

RandomGenerator::Bernoulli ( double p ) : bool