MCPcopy Create free account
hub / github.com/esengine/esengine / nextInt

Method nextInt

packages/procgen/src/random/SeededRandom.ts:81–83  ·  view source on GitHub ↗

* @zh 生成整数 [min, max] * @en Generate integer [min, max]

(min: number, max: number)

Source from the content-addressed store, hash-verified

79 * @en Generate integer [min, max]
80 */
81 nextInt(min: number, max: number): number {
82 return Math.floor(this.next() * (max - min + 1)) + min;
83 }
84
85 /**
86 * @zh 生成浮点数 [min, max)

Callers 1

executeMethod · 0.95

Calls 1

nextMethod · 0.95

Tested by

no test coverage detected