Exemplo n.º 1
0
        public virtual void NextDoubleRange()
        {
            Initialize();
            double Ry  = 0;
            double min = 0.5;
            double max = 0.5;

            Console.WriteLine("サンプル数:{0}回", TestDoubleRange);
            Console.WriteLine("0 < X > 1.0 かどうかを検証します");
            for (uint i = 0; i < TestDoubleRange; i++)
            {
                Ry = m_Random.NextDouble();
                if (Ry < min)
                {
                    min = Ry;
                }
                if (Ry > max)
                {
                    max = Ry;
                }
                Console.Write("{0} : ", i);
                Console.WriteLine("{0}", Ry);
                Assert.IsTrue(Ry >= 0.0 && Ry <= 1.0);
            }
            Console.Write("max = {0}, min = {1}", max, min);
        }