So I have a little set of functions to determine a random number but for some reason the number isn’t always random. Here’s an example of the code i’m using:
First function to determine a random number for 2 sets of numbers (Example: 2500 to 3000 and -2500 to -3000):
This next function uses the last one and then just assigns each random number as return values:
Finally I have a have a switch and depending on the scenario it sets the min and values:
Now the problem here is sometimes it does generate a random number but sometimes it doesn’t. For example, if put 2500 for the min value, and 3000 for the value what usually happens is the number -2500 gets chosen a lot. I’m talking like every second it gets run it chooses -2500, while other times it generates a random number such as 2738. After looking it over it looks like it should work, I don’t know what’s wrong. Any help would be appreciated, thanks!