| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 1 1 4420 1 1 | define(function () {
/**
* Just a wrapper to Math.random. No methods inside amd-utils should call
* Math.random() directly so we can inject the pseudo-random number
* generator if needed (ie. in case we need a seeded random or a better
* algorithm than the native one)
* @version 0.1.0 (2012/11/29)
*/
function random(){
return random.get();
}
// we expose the method so it can be swapped if needed
random.get = Math.random;
return random;
});
|