Pchp.Library.MersenneTwister.Seed C# (CSharp) Method

Seed() public method

Seeds the generator.
public Seed ( uint seed ) : void
seed uint The seed.
return void
        public void Seed(uint seed)
        {
            mt[0] = seed;
            for (int i = 1; i < N; i++)
            {
                // See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier.
                // In the previous versions, MSBs of the seed affect
                // only MSBs of the array mt[].
                // 2002/01/09 modified by Makoto Matsumoto
                mt[i] = unchecked((uint)((1812433253UL * (mt[i - 1] ^ (mt[i - 1] >> 30)) + (ulong)i)));
            }
            mti = N;
        }