Generating random numbers?
What's the best way to generate random (or even pseudo-random) numbers? I notice that the CryptoUtil library can generate various random things (strings, longs, doubles, etc.) but oddly, there is no function to generate random integers. Should I be creating a random long and then convert it back to an integer? I would have expected there to be an easier way. Am I missing something obvious?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?OK, I think I answered my own question. Generating a long integer within a specific range seems to be exactly what I'm looking for. I guess I was surprised to find these functions in the Crypto library and also that the function name was "GenerateRandomLong"/"GenerateRandomLongRange".
Works well, though.
I’m feeling less randomized.
Loading Profile...

