var rand = (min + Math.random() * (max - min)) +'px'; // строка rand = Math.round(rand);
alert( Math.round('100px') ); // NaN