Random function
-
- Posts: 71
- Joined: 12 Nov 2022, 15:47
Random function
I know the "Random" function creates a pseudo-random number. If I set the range from 1 to 10 and then execute something when the generated number is 5 or less, will the execution occur at a rate of 50%? Just making sure.
-
- Posts: 6
- Joined: 20 May 2023, 15:29
- Contact:
Re: Random function
This is something you can just test quickly by yourself. just loop like 100.000 times and in the loop generate a random number and then store if its below 5. after the loop is done print the stored times it was below 5 and you would know the percentage. could even have ahk calculate the percentage. if you wanna be really save you do a few million loop iterations