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

◆ Next() [3/3]

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

Definition at line 153 of file Random.cs.

154 {
155 long num = (long)maxValue - (long)minValue;
156 if (num > int.MaxValue)
157 {
158 return (int)((long)(_prng.GetSampleForLargeRange() * (double)num) + minValue);
159 }
160 return (int)(_prng.Sample() * (double)num) + minValue;
161 }
double GetSampleForLargeRange()
Definition Random.cs:417

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