Hey there! Thanks for pointing this out to us. I’ve made a ticket so we can look into updating that code. Thanks again and please let us know if you spot anything else we should look into.
Hello again waifuluvr9001. I just wanted to give you an update on this. We’ve passed this along to our colleagues on the dev side of things. They’re aware of this issue, and are addressing it as part of a larger initiative. Unfortunately, I’m not sure how long it’ll take them to get to it. I’ll try and give another update if I hear anything else.
Hey waifuluvr9001! I’ve yet another update for you.
I spoke a bit more with my colleagues who looked into RandHelper and RandRange, and they found that both functions work as expected (and their API reference info is correct). RandHelper does indeed return between 0 and A-1 as you mentioned. This means RandRange technically does what it says because it adds one to the range before passing it to RandHelper. As such, it looks like it can return the max.
During testing, both functions returned the expected values with reasonably good distribution.
Work continues on a related project, which may or may not impact the API documentation you linked to. But for the meantime, they’ve investigated this and said it’s working as intended.
I hope this helps to clear things up. Please let us know if there’s anything else you think we should look into.