Closed nicnz closed 3 years ago
Can you detail a situation where it generates a negative random number?
I'm thinking about what you stated here, but um you are misleading the input/output because of your (int) type conversion. That should be a uint
and you should change of the method signature or at least add to the method comment for intellisense please.
When calling RandomNumber.Next() 1/2 the time will return a value less than 0
By always converting to an uint, the calculation below then correctly returns a number between 0 and int.max