Created
February 25, 2015 00:17
-
-
Save nicksheffield/d4cc9228de0dca472dc0 to your computer and use it in GitHub Desktop.
random number generator
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
// r( max, min, decimal places) | |
function r(a,b,c){ return parseFloat((Math.random()*((a?a:1)-(b?b:0))+(b?b:0)).toFixed(c?c:0)); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment