Last change
on this file since 256 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
File size:
662 bytes
|
Line | |
---|
1 | define(["dojo"], function(dojo) { |
---|
2 | |
---|
3 | return dojo.declare("dojox.math.random.Simple", null, { |
---|
4 | // summary: |
---|
5 | // Super simple implementation of a random number generator, |
---|
6 | // which relies on Math.random(). |
---|
7 | |
---|
8 | destroy: function(){ |
---|
9 | // summary: |
---|
10 | // Prepares the object for GC. (empty in this case) |
---|
11 | }, |
---|
12 | |
---|
13 | nextBytes: function(/* Array */ byteArray){ |
---|
14 | // summary: |
---|
15 | // Fills in an array of bytes with random numbers |
---|
16 | // byteArray: Array: |
---|
17 | // array to be filled in with random numbers, only existing |
---|
18 | // elements will be filled. |
---|
19 | for(var i = 0, l = byteArray.length; i < l; ++i){ |
---|
20 | byteArray[i] = Math.floor(256 * Math.random()); |
---|
21 | } |
---|
22 | } |
---|
23 | }); |
---|
24 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.