MCPcopy
hub / github.com/simstudioai/sim / randomFloat

Function randomFloat

packages/utils/src/random.ts:49–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 * Drop-in replacement for `Math.random()`.
48 */
49export function randomFloat(): number {
50 const [value] = crypto.getRandomValues(new Uint32Array(1))
51 return value / 0x100000000
52}
53
54/**
55 * Returns a cryptographically secure random integer in [min, max).

Callers 13

randomDateFunction · 0.90
generateUserRowFunction · 0.90
calculateBackoffFunction · 0.90
generateToolUseIdFunction · 0.90
generateToolUseIdFunction · 0.90
getRedisClientFunction · 0.90
generateFileIdFunction · 0.90
executeInIsolatedVMFunction · 0.90
handleFileChangeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected