public DecimalRandomGenerator(decimal from = decimal.MinValue, decimal to = decimal.MaxValue)
        {
            if (from > to)
            {
                throw new ArgumentOutOfRangeException("Minimum should not be greater than maximum.");
            }

            _doubleRandomGenerator = new DoubleRandomGenerator((double)from, (double)to);
        }
Beispiel #2
0
        public FloatRandomGenerator(float from = DEFAULT_MIN_VALUE, float to = DEFAULT_MAX_VALUE)
        {
            if (from > to)
            {
                throw new ArgumentOutOfRangeException("Minimum should not be greater than maximum.");
            }

            _doubleRandomGenerator = new DoubleRandomGenerator(from, to);
        }