예제 #1
0
        public static DateTime Next(DateTime from, DateTime to)
        {
            var range        = to - from;
            var randTimeSpan = new TimeSpan((long)(_rnd.NextDouble() * range.Ticks));

            return(from + randTimeSpan);
        }
예제 #2
0
        public static double Next(double minValue, double maxValue)
        {
            ChoCryptoRandom random = new ChoCryptoRandom();

            return(random.NextDouble() * (maxValue - minValue) + minValue);
        }