MCPcopy Create free account
hub / github.com/bergside/typeui / randomInt

Function randomInt

src/generation/randomDesignSystem.ts:220–222  ·  view source on GitHub ↗
(min: number, max: number)

Source from the content-addressed store, hash-verified

218];
219
220function randomInt(min: number, max: number): number {
221 return Math.floor(Math.random() * (max - min + 1)) + min;
222}
223
224function sampleOne<T>(values: T[]): T {
225 return values[randomInt(0, values.length - 1)];

Callers 3

sampleOneFunction · 0.85
sampleManyFunction · 0.85
generateColorTokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected