* Get a uniformly distributed IEEE-754 double between 0.0 and 1.0, with * 53 bits of precision (every bit of the mantissa is randomized). * * @category getters * @since 2.0.0
()
| 625 | * @since 2.0.0 |
| 626 | */ |
| 627 | number() { |
| 628 | const hi = (this._next() & 0x03ffffff) * 1.0 |
| 629 | const lo = (this._next() & 0x07ffffff) * 1.0 |
| 630 | return (hi * BIT_27 + lo) / BIT_53 |
| 631 | } |
| 632 | |
| 633 | /** @internal */ |
| 634 | private _next() { |
no test coverage detected