MCPcopy
hub / github.com/pyrochlore/obsidian-tracker / random

Function random

examples/example_generator.ts:12–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10let seed = 1;
11
12function random() {
13 var x = Math.sin(seed++) * 10000;
14 return x - Math.floor(x);
15}
16
17function randomIntFromInterval(min: number, max: number) {
18 return Math.floor(random() * (max - min + 1) + min);

Callers 2

randomIntFromIntervalFunction · 0.85
randomFloatFromIntervalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected