Last active
June 25, 2016 18:45
-
-
Save Titiaiev/cf601cac5d8ea9fe77c9a1d26638b7f5 to your computer and use it in GitHub Desktop.
функция рандомного целого числа в заданом диапазоне
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function randomInteger(min, max) { | |
var rand = min + Math.random() * (max + 1 - min); | |
rand = Math.floor(rand); | |
return rand; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment