
BETIDA

© 2025 brandname.com | All Rights Reserved.
BETIDA is owned and operated by Medium Nam ultrices mi sed sem number: 3241231, registered address: Maecenas at est interdum. Payment agent companies are Ut pharetra turpis eu justo and Ut Justo Limited. Contact us at support@brandname.com.
BETIDA is committed to responsible gambling, for more information visit Gamblingtherapy.org

// Convert the hash output from the rng byteGenerator to floats
function generateFloats ({ serverSeed, clientSeed, nonce, cursor, count }) {
// Random number generator function
const rng = byteGenerator({ serverSeed, clientSeed, nonce, cursor });
// Declare bytes as empty array
const bytes = [];
// Populate bytes array with sets of 4 from RNG output
while (bytes.length < count * 4) {
bytes.push(rng.next().value);
}
// Return bytes as floats using lodash reduce function
return _.chunk(bytes, 4).map(bytesChunk =>
bytesChunk.reduce((result, value, i) => {
const divider = 256 ** (i + 1);
const partialResult = value / divider;
return result + partialResult;
}, 0)
);
};