MCPcopy Create free account
hub / github.com/cryptii/cryptii / nextFloat

Method nextFloat

src/Random.js:43–45  ·  view source on GitHub ↗

* Returns next float in given range [min-max[. * @param {number} min Minimum float (inclusive) * @param {number} max Maximum float (exclusive) * @return {number}

(min, max)

Source from the content-addressed store, hash-verified

41 * @return {number}
42 */
43 nextFloat (min, max) {
44 return this.next() * (max - min) + min
45 }
46
47 /**
48 * Returns next integer in given range [min-max].

Callers 1

randomizeValueMethod · 0.80

Calls 1

nextMethod · 0.95

Tested by

no test coverage detected