On 2011-02-06 05:07, Cedric Vivier wrote:
On Sun, Feb 6, 2011 at 11:34, Roger Hågensen<[email protected]> wrote:
But getRandomValues(in ArrayBufferView data) seem to indicate that each byte
(value) is random, limited to an array of 8bit data?.
In the context of typed arrays, a value depends of the type of the
ArrayBufferView. ArrayBufferView are interchangable using the same
ArrayBuffer (the actual underlying bytes).
Passing an Uint8Array will give you random Uint8 values at each index
of the array, passing an Int32Array will give you random Int32 values
at each index of the array as well.
Ah ok, so just fill the buffer/destination with random data. That sounds
as good as and as flexible as one possibly can get.
--
Roger "Rescator" Hågensen.
Freelancer - http://www.EmSai.net/