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

Function sampleUniform

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

Source from the content-addressed store, hash-verified

119570 return dist.distributions(dists).weights(weights);
119571}
119572function sampleUniform(min, max) {
119573 if (max == null) {
119574 max = min == null ? 1 : min;
119575 min = 0;
119576 }
119577 return min + (max - min) * random();
119578}
119579function densityUniform(value, min, max) {
119580 if (max == null) {
119581 max = min == null ? 1 : min;

Callers 1

uniformFunction · 0.70

Calls 1

randomFunction · 0.70

Tested by

no test coverage detected