You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
667 B
24 lines
667 B
define(["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()); |
|
} |
|
} |
|
}); |
|
});
|
|
|