diff options
| author | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
|---|---|---|
| committer | Tristan Zur <tzur@web.web.ccwn.org> | 2014-03-27 22:27:47 +0100 |
| commit | b62676ca5d3d6f6ba3f019ea3f99722e165a98d8 (patch) | |
| tree | 86722cb80f07d4569f90088eeaea2fc2f6e2ef94 /js/dojo-1.7.2/dojox/math/random/Simple.js | |
Diffstat (limited to 'js/dojo-1.7.2/dojox/math/random/Simple.js')
| -rw-r--r-- | js/dojo-1.7.2/dojox/math/random/Simple.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/js/dojo-1.7.2/dojox/math/random/Simple.js b/js/dojo-1.7.2/dojox/math/random/Simple.js new file mode 100644 index 0000000..0061979 --- /dev/null +++ b/js/dojo-1.7.2/dojox/math/random/Simple.js @@ -0,0 +1,25 @@ +//>>built +define("dojox/math/random/Simple", ["dojo"], function(dojo) { + + return dojo.declare("dojox.math.random.Simple", null, { + // summary: + // Super simple implementation of a random number generator, + // which relies on Math.random(). + + destroy: function(){ + // summary: + // Prepares the object for GC. (empty in this case) + }, + + nextBytes: function(/* Array */ byteArray){ + // summary: + // Fills in an array of bytes with random numbers + // byteArray: Array: + // array to be filled in with random numbers, only existing + // elements will be filled. + for(var i = 0, l = byteArray.length; i < l; ++i){ + byteArray[i] = Math.floor(256 * Math.random()); + } + } + }); +}); |
