MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / randomCoordinate

Function randomCoordinate

apps/web/src/scripts/usage/benchmark-insert-usage.ts:42–44  ·  view source on GitHub ↗
(min: number, max: number)

Source from the content-addressed store, hash-verified

40}
41
42function randomCoordinate(min: number, max: number): number {
43 return min + (secureRandomInt(0, 1_000_000) / 1_000_000) * (max - min);
44}
45
46function pickRandom<T>(arr: T[], rand: number): T {
47 return arr[Math.floor(rand * arr.length)];

Callers 1

generateRandomRecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected