MCPcopy Create free account
hub / github.com/alignoth/alignoth / ls

Function ls

resources/vega.min.js:4404–4420  ·  view source on GitHub ↗
(e, n)

Source from the content-addressed store, hash-verified

4402 ss = Math.SQRT2;
4403 let us = NaN;
4404 function ls(e, n) {
4405 ((e = e || 0), (n = null == n ? 1 : n));
4406 let r,
4407 i,
4408 o = 0,
4409 a = 0;
4410 if (us == us) ((o = us), (us = NaN));
4411 else {
4412 do {
4413 ((o = 2 * t.random() - 1),
4414 (a = 2 * t.random() - 1),
4415 (r = o * o + a * a));
4416 } while (0 === r || r > 1);
4417 ((i = Math.sqrt((-2 * Math.log(r)) / r)), (o *= i), (us = a * i));
4418 }
4419 return e + o * n;
4420 }
4421 function cs(t, e, n) {
4422 const r = (t - (e || 0)) / (n = null == n ? 1 : n);
4423 return Math.exp(-0.5 * r * r) / (n * as);

Callers 2

dsFunction · 0.70
gsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected