Created
March 10, 2015 18:33
-
-
Save pseudosavant/3570e381e4cfb810f6d1 to your computer and use it in GitHub Desktop.
Generates a random number between two values
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
// Generates a random number between two values | |
function randomBetween(bottom, top) { | |
return Math.floor((top-bottom) * Math.random() + bottom); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment