speice.io/blog/2024-11-15-playing-with-fire/1-introduction/randint.ts

3 lines
125 B
TypeScript
Raw Normal View History

export default function randomInteger(min: number, max: number) {
return Math.floor(Math.random() * (max - min)) + min;
}