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

Function densityUniform

docs/app/js/sanddance-app.js:119579–119585  ·  view source on GitHub ↗
(value, min, max)

Source from the content-addressed store, hash-verified

119577 return min + (max - min) * random();
119578}
119579function densityUniform(value, min, max) {
119580 if (max == null) {
119581 max = min == null ? 1 : min;
119582 min = 0;
119583 }
119584 return value >= min && value <= max ? 1 / (max - min) : 0;
119585}
119586function cumulativeUniform(value, min, max) {
119587 if (max == null) {
119588 max = min == null ? 1 : min;

Callers 1

uniformFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected