Skip to content

Instantly share code, notes, and snippets.

@pseudosavant
Created March 10, 2015 18:33
Show Gist options
  • Save pseudosavant/3570e381e4cfb810f6d1 to your computer and use it in GitHub Desktop.
Save pseudosavant/3570e381e4cfb810f6d1 to your computer and use it in GitHub Desktop.
Generates a random number between two values
// 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