- From: Roger Hågensen <rescator@emsai.net>
- Date: Sun, 06 Feb 2011 08:10:41 +0100
On 2011-02-06 05:07, Cedric Vivier wrote: > On Sun, Feb 6, 2011 at 11:34, Roger H?gensen<rescator at emsai.net> 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/
Received on Saturday, 5 February 2011 23:10:41 UTC