MCPcopy Create free account
hub / github.com/Effect-TS/effect / nextBetween

Function nextBetween

packages/effect/src/Random.ts:141–142  ·  view source on GitHub ↗
(min: number, max: number)

Source from the content-addressed store, hash-verified

139 * @since 4.0.0
140 */
141export const nextBetween = (min: number, max: number): Effect.Effect<number> =>
142 randomWith((r) => r.nextDoubleUnsafe() * (max - min) + min)
143
144/**
145 * Generates a random integer between `min` and `max`.

Callers

nothing calls this directly

Calls 2

randomWithFunction · 0.85
nextDoubleUnsafeMethod · 0.65

Tested by

no test coverage detected