Skip to main content
The Deno 2 Release Candidate is here
Learn more
method RandomUtil.prototype.randInt
import { RandomUtil } from "https://deno.land/x/sptaki@1.2.0/utils/RandomUtil.d.ts";

Draw Random integer low inclusive, high exclusive if high is not set we draw from 0 to low (exclusive)

Parameters

low: number

Lower bound inclusive, when high is not set, this is high

optional
high: number

Higher bound exclusive

Returns

number

The random integer in [low, high)