Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Next() [3/3]

override int System.Random.Net5CompatDerivedImpl.Next ( int minValue,
int maxValue )
inline

Definition at line 254 of file Random.cs.

255 {
256 long num = (long)maxValue - (long)minValue;
257 if (num > int.MaxValue)
258 {
259 return (int)((long)(_prng.GetSampleForLargeRange() * (double)num) + minValue);
260 }
261 return (int)(_parent.Sample() * (double)num) + minValue;
262 }
virtual double Sample()
Definition Random.cs:721
double GetSampleForLargeRange()
Definition Random.cs:417

References System.Random.Net5CompatDerivedImpl._parent, System.Random.Net5CompatDerivedImpl._prng, System.Random.CompatPrng.GetSampleForLargeRange(), and System.Random.Sample().