Exemplo n.º 1
0
        public void TestZigguratNormalGenerator_Unseeded_InitializesCorrectly()
        {
            var    rng = new ZigguratNormalGenerator();
            double num = rng.Generate();

            Assert.NotNull(rng);
        }
Exemplo n.º 2
0
        public void TestZigguratGenerator_Unseeded_NeverOverflows()
        {
            var rng = new ZigguratNormalGenerator();

            for (int i = 0; i < 100; i++)
            {
                double num = rng.Generate();
            }

            Assert.NotNull(rng);
        }
Exemplo n.º 3
0
        public void TestZigguratNormalGenerator_WithSeed_InitializesCorrectly()
        {
            var rng1 = new ZigguratNormalGenerator(seed: 457860009);
            var rng2 = new ZigguratNormalGenerator(seed: 457860009);

            double num1 = rng1.Generate();
            double num2 = rng2.Generate();

            Console.WriteLine(num1);
            Assert.AreEqual(num1, num2);
        }