Created
October 28, 2013 20:20
-
-
Save davmillar/7203866 to your computer and use it in GitHub Desktop.
Quick function for generating a random integer.
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
| var randInt = function (rMin, rMax) { | |
| return (rMin + Math.floor(Math.random() * (rMax - rMin + 1))); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment