PeterO.RandomGenerator.Binomial C# (CSharp) Method

Binomial() public method

Conceptually, generates either 1 or 0 the given number of times, where either number is equally likely, and counts the number of 1's generated.
public Binomial ( int trials ) : int
trials int The number of times to generate a random /// number, conceptually.
return int
        public int Binomial(int trials)
        {
            return this.Binomial(trials, 0.5);
        }

Same methods

RandomGenerator::Binomial ( int trials, double p ) : int