|
1885 | 1885 | ((<a href="#846">hash</a> >> <span class="number">32</span>) & <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from">u64::from</a>(u32::MAX)) <span class="kw">as </span><a href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>,
|
1886 | 1886 | );
|
1887 | 1887 |
|
1888 |
| - <span class="comment">// http://prng.di.unimi.it -> Generating uniform doubles in the unit interval [0.0, 1.0) |
| 1888 | + <span class="comment">// https://prng.di.unimi.it -> Generating uniform doubles in the unit interval [0.0, 1.0) |
1889 | 1889 | // the hash is shifted to only cover the mantissa
|
1890 | 1890 | </span><span class="attr">#[allow(clippy::cast_precision_loss)]
|
1891 | 1891 | </span><span class="kw">let </span>u0 = <a href="#755">ClosedOpenUnit</a>(((<a href="#848">high</a> >> <span class="number">8</span>) <span class="kw">as </span><span class="self">Self</span>) * <a href="https://doc.rust-lang.org/nightly/core/foreigntype.f32.html#method.from_bits"><span class="self">Self</span>::from_bits</a>(<span class="number">0x3380_0000_u32</span>)); <span class="comment">// 0x1.0p-24
|
1892 | 1892 |
|
1893 |
| - // http://prng.di.unimi.it -> Generating uniform doubles in the unit interval (0.0, 1.0] |
| 1893 | + // https://prng.di.unimi.it -> Generating uniform doubles in the unit interval (0.0, 1.0] |
1894 | 1894 | // the hash is shifted to only cover the mantissa
|
1895 | 1895 | </span><span class="attr">#[allow(clippy::cast_precision_loss)]
|
1896 | 1896 | </span><span class="kw">let </span>u1 = <a href="#760">OpenClosedUnit</a>((((<a href="#848">low</a> >> <span class="number">8</span>) + <span class="number">1</span>) <span class="kw">as </span><span class="self">Self</span>) * <a href="https://doc.rust-lang.org/nightly/core/foreigntype.f32.html#method.from_bits"><span class="self">Self</span>::from_bits</a>(<span class="number">0x3380_0000_u32</span>)); <span class="comment">// 0x1.0p-24
|
|
1918 | 1918 | }
|
1919 | 1919 |
|
1920 | 1920 | <span class="kw">fn </span>u01x2(hash: <a href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> (ClosedOpenUnit<<span class="self">Self</span>>, OpenClosedUnit<<span class="self">Self</span>>) {
|
1921 |
| - <span class="comment">// http://prng.di.unimi.it -> Generating uniform doubles in the unit interval [0.0, 1.0) |
| 1921 | + <span class="comment">// https://prng.di.unimi.it -> Generating uniform doubles in the unit interval [0.0, 1.0) |
1922 | 1922 | // the hash is shifted to only cover the mantissa
|
1923 | 1923 | </span><span class="attr">#[allow(clippy::cast_precision_loss)]
|
1924 | 1924 | </span><span class="kw">let </span>u0 =
|
1925 | 1925 | <a href="#755">ClosedOpenUnit</a>(((<a href="#885">hash</a> >> <span class="number">11</span>) <span class="kw">as </span><span class="self">Self</span>) * <a href="https://doc.rust-lang.org/nightly/core/foreigntype.f64.html#method.from_bits"><span class="self">Self</span>::from_bits</a>(<span class="number">0x3CA0_0000_0000_0000_u64</span>)); <span class="comment">// 0x1.0p-53
|
1926 | 1926 |
|
1927 | 1927 | </span><span class="kw">let </span>hash = <a href="#730-750">seahash_diffuse</a>(<a href="#885">hash</a> + <span class="number">1</span>);
|
1928 | 1928 |
|
1929 |
| - <span class="comment">// http://prng.di.unimi.it -> Generating uniform doubles in the unit interval (0.0, 1.0] |
| 1929 | + <span class="comment">// https://prng.di.unimi.it -> Generating uniform doubles in the unit interval (0.0, 1.0] |
1930 | 1930 | // the hash is shifted to only cover the mantissa
|
1931 | 1931 | </span><span class="attr">#[allow(clippy::cast_precision_loss)]
|
1932 | 1932 | </span><span class="kw">let </span>u1 = <a href="#760">OpenClosedUnit</a>(
|
|
0 commit comments