MCPcopy Create free account
hub / github.com/microsoft/SandDance / cdf

Function cdf

docs/app/js/sanddance-app.js:119264–119267  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

119262 return x === Math.floor(x) && x >= a && x < b ? 1 / d : 0;
119263 },
119264 cdf (x) {
119265 const v = Math.floor(x);
119266 return v < a ? 0 : v >= b ? 1 : (v - a + 1) / d;
119267 },
119268 icdf (p) {
119269 return p >= 0 && p <= 1 ? a - 1 + Math.floor(p * d) : NaN;
119270 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected