示例#1
0
文件: Random.cs 项目: mangod9/runtime
            public override long NextInt64()
            {
                long result = LocalRandom.NextInt64();

                AssertInRange(result, 0, long.MaxValue);
                return(result);
            }
示例#2
0
            public override long NextInt64(long minValue, long maxValue)
            {
                if (minValue > maxValue)
                {
                    ThrowMinMaxValueSwapped();
                }

                return(LocalRandom.NextInt64(minValue, maxValue));
            }
示例#3
0
            public override long NextInt64(long maxValue)
            {
                if (maxValue < 0)
                {
                    ThrowMaxValueMustBeNonNegative();
                }

                return(LocalRandom.NextInt64(maxValue));
            }
示例#4
0
文件: Random.cs 项目: mangod9/runtime
            public override long NextInt64(long minValue, long maxValue)
            {
                if (minValue > maxValue)
                {
                    ThrowMinMaxValueSwapped();
                }

                long result = LocalRandom.NextInt64(minValue, maxValue);

                AssertInRange(result, minValue, maxValue);
                return(result);
            }
示例#5
0
文件: Random.cs 项目: mangod9/runtime
            public override long NextInt64(long maxValue)
            {
                if (maxValue < 0)
                {
                    ThrowMaxValueMustBeNonNegative();
                }

                long result = LocalRandom.NextInt64(maxValue);

                AssertInRange(result, 0, maxValue);
                return(result);
            }
示例#6
0
 public override long NextInt64() => LocalRandom.NextInt64();