UNPKG

tf2-rtp-calculator

Version:

An RTP simulator/calculator for Team Fortress 2 crates.

15 lines (13 loc) 362 B
import fortuna = require("javascript-fortuna"); fortuna.init(); /** * Generates a random integer in the range [min, max]. * @param min * @param max */ export function intInRange(min: number, max: number): number { return min + Math.floor(fortuna.random() * (max - min + 1)); } export function random(): number { return fortuna.random(); }