tweb/src/helpers/number/getUnsafeRandomInt.ts
Eduard Kuzmenko 4609f6cac5 Fix old dialogs at top of the chatlist
Fix formatting call duration
Fix horizontal scrolling
2022-11-22 16:57:21 +04:00

6 lines
182 B
TypeScript

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