PeterO.RandomGenerator.Geometric C# (CSharp) Method

Geometric() public method

Conceptually, generates either 1 or 0 until a 1 is generated, and counts the number of 0's generated. Either number has an equal probability of being generated.
public Geometric ( ) : int
return int
        public int Geometric()
        {
            return this.NegativeBinomial(1, 0.5);
        }

Same methods

RandomGenerator::Geometric ( double p ) : int