ViperMonkey icon indicating copy to clipboard operation
ViperMonkey copied to clipboard

Rnd Function Fix

Open malvidin opened this issue 1 year ago • 0 comments

The Rnd function does not return 71 if Randomize is not called.

Steps to reproduce the behavior: Execute script:

intHighNumber = 100
intLowNumber = 1

intNumber = Int((intHighNumber – intLowNumber + 1) * Rnd + intLowNumber)
Wscript.Echo intNumber

71 should be returned, unless Randomize is called before Rnd.

https://devblogs.microsoft.com/scripting/how-can-i-generate-random-numbers-using-a-script/

malvidin avatar Jul 20 '22 19:07 malvidin