MCPcopy Index your code
hub / github.com/aiscript-dev/aiscript / rnd

Function rnd

test/interpreter.ts:307–309  ·  view source on GitHub ↗
(min: number, max: number)

Source from the content-addressed store, hash-verified

305
306 describe('randomly scheduled pausing', () => {
307 function rnd(min: number, max: number): number {
308 return Math.floor(min + (Math.random() * (max - min + 1)));
309 }
310 const schedule = Array(rnd(2, 10)).fill(0).map(() => rnd(1, 10) * 100);
311 const title = schedule.map((v, i) => `${i % 2 ? 'un' : ''}pause ${v}`).join(', ');
312

Callers 1

interpreter.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected