MCPcopy
hub / github.com/Effect-TS/effect / integer

Method integer

packages/effect/src/Utils.ts:616–618  ·  view source on GitHub ↗

* Get a uniformly distributed 32 bit integer between [0, max). * * @category getter * @since 2.0.0

(max: number)

Source from the content-addressed store, hash-verified

614 * @since 2.0.0
615 */
616 integer(max: number) {
617 return Math.round(this.number() * Number.MAX_SAFE_INTEGER) % max
618 }
619
620 /**
621 * Get a uniformly distributed IEEE-754 double between 0.0 and 1.0, with

Callers 15

randomIntegerFunction · 0.95
randomIntegerBetweenFunction · 0.95
DocArbitrary.tsFile · 0.80
Args.test.tsFile · 0.80
ConfigFile.test.tsFile · 0.80
Options.test.tsFile · 0.80
Primitive.test.tsFile · 0.80
grep.tsFile · 0.80
tail.tsFile · 0.80
wizardInternalFunction · 0.80
wizardInternalFunction · 0.80

Calls 1

numberMethod · 0.95

Tested by 1

splitFunction · 0.64