Spaces:
Paused
Paused
Download node_modules/@plotly/d3/src/math/random.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 791 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/math/random.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/@plotly/d3/src/math/random.js
-
curl -L -o random.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/%40plotly/d3/src/math/random.js
791 Bytes
| d3.random = { | |
| normal: function(µ, σ) { | |
| var n = arguments.length; | |
| if (n < 2) σ = 1; | |
| if (n < 1) µ = 0; | |
| return function() { | |
| var x, y, r; | |
| do { | |
| x = Math.random() * 2 - 1; | |
| y = Math.random() * 2 - 1; | |
| r = x * x + y * y; | |
| } while (!r || r > 1); | |
| return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r); | |
| }; | |
| }, | |
| logNormal: function() { | |
| var random = d3.random.normal.apply(d3, arguments); | |
| return function() { | |
| return Math.exp(random()); | |
| }; | |
| }, | |
| bates: function(m) { | |
| var random = d3.random.irwinHall(m); | |
| return function() { | |
| return random() / m; | |
| }; | |
| }, | |
| irwinHall: function(m) { | |
| return function() { | |
| for (var s = 0, j = 0; j < m; j++) s += Math.random(); | |
| return s; | |
| }; | |
| } | |
| }; | |