Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
How to get games to players. For questions about methods and tools for getting games and game components (assets, expansions, dlc, etc.) to players.
6
votes
Random number in a range, biased toward the low end of the range
use a local variable to save a random call:
function F(min, max) {
var t = random(); //Assuming this returns a value between 0 and 1
return min + (max - min) * t * t;
}
This makes a non linear distribution … You can force even more extremal distribution by inserting t = t*t or user a pow with other values. …