diff options
Diffstat (limited to 'js/dojo-1.6/dojox/math/random/Simple.xd.js')
| -rw-r--r-- | js/dojo-1.6/dojox/math/random/Simple.xd.js | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/js/dojo-1.6/dojox/math/random/Simple.xd.js b/js/dojo-1.6/dojox/math/random/Simple.xd.js new file mode 100644 index 0000000..53e4283 --- /dev/null +++ b/js/dojo-1.6/dojox/math/random/Simple.xd.js @@ -0,0 +1,40 @@ +/*
+ Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
+ Available via Academic Free License >= 2.1 OR the modified BSD license.
+ see: http://dojotoolkit.org/license for details
+*/
+
+
+dojo._xdResourceLoaded(function(dojo, dijit, dojox){
+return {depends: [["provide", "dojox.math.random.Simple"]],
+defineResource: function(dojo, dijit, dojox){if(!dojo._hasResource["dojox.math.random.Simple"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
+dojo._hasResource["dojox.math.random.Simple"] = true;
+dojo.provide("dojox.math.random.Simple");
+
+
+
+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());
+ }
+ }
+});
+
+}
+
+}};});
|
