Created
November 8, 2016 19:46
-
-
Save dustinpoissant/156332da10563a0e00364a8c38c917ed to your computer and use it in GitHub Desktop.
Generate a Random Integer within a range.
This file contains hidden or 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
Math.__proto__.randInt = function(min, max){ | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
}; |
This file contains hidden or 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
Math.__proto__.randInt=function(a,b){return Math.floor(Math.random()*(b-a+1))+a}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment