-
Math.random returns always the same number Extendscript
Hi, I got this function:
function randomIntInRange(min, max) {
now = new Date();
seed = now.getMilliseconds();
return Math.floor(Math.random(seed) * (max - min + 1) + min);
}
I used it for a long time with no problems(on mac and windows). But since yesterday, is behaving in a strange way. I use it on a loop, and is returning me always the same number when I run the script. I tryed to use the red dot on the Toolkit to see what happens, clickiing on the play button every loop, but then, it works properly and returns diferent numbers.
Anybody can figure out what is happening?PD: The same script with no changes worked the past days.