mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
9 lines
192 B
TypeScript
9 lines
192 B
TypeScript
|
|
function getRandomInt(min: number, max: number) : number {
|
|
min = Math.ceil(min);
|
|
max = Math.floor(max);
|
|
return Math.floor(Math.random() * (max - min)) + min;
|
|
}
|
|
|
|
export { getRandomInt }
|