EdgeAIG's picture
download
raw
491 Bytes
//#region src/distribution/uniformFloat32.ts
const scale = 5.960464477539063e-8;
const mask = 16777215;
/**
* Uniformly generate random 32-bit floating point values between 0 (included) and 1 (excluded)
*
* @remarks Generated values are multiples of 2**-24, providing 24 bits of randomness.
*
* @param rng - Instance of RandomGenerator to extract random values from
*
* @public
*/
function uniformFloat32(rng) {
return (rng.next() & mask) * scale;
}
//#endregion
export { uniformFloat32 };

Xet Storage Details

Size:
491 Bytes
·
Xet hash:
755597edbd1dc97e5ecf83f251fc18be3ea95782fffa1198eb74343925082854

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.