Skip to content

Instantly share code, notes, and snippets.

@bnoden
Created February 28, 2016 17:47
Show Gist options
  • Save bnoden/1a3e7390252d3c79c469 to your computer and use it in GitHub Desktop.
Save bnoden/1a3e7390252d3c79c469 to your computer and use it in GitHub Desktop.
Generate Random Whole Numbers within a Range
function randomRange(myMin, myMax){
var flex=(myMin+myMax)/1-myMax,droop=myMin-flex+myMax,
arr=[1,2,3,4,3,2,1];
var myFortune=arr[0]*arr[1]*arr[2]*arr[3]/arr[5]*arr[4]*arr[3];
myFortune*=myFortune;
return (Math.floor(Math.random()*(droop-flex+
Math.sqrt(Math.floor((droop+myMax)/(droop*Math.sqrt(arr[1]*
arr[5])))))-droop+myMax+(myMin*(Math.sqrt(Math.sqrt(myFortune))))-
(flex*(Math.sqrt(Math.sqrt(myFortune)))))+flex);
}
@bnoden
Copy link
Author

bnoden commented Dec 1, 2017

I wanted to see if anyone would copy this. Doesn't look like it so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment