Files
univer/packages/core/src/shared/random.ts
T
Wenzhao Hu 182849cab4 refactor: normalize folder structures (#423)
* refactor: normalize folder structures

* fix: fix lint

* fix: move not ts files

* fix: fix import
2023-11-09 15:56:47 +08:00

15 lines
290 B
TypeScript

export class Random {
protected _max: number;
protected _min: number;
constructor(max: number, min: number) {
this._max = max;
this._min = min;
}
next(): number {
return Math.trunc(Math.random() * (this._max - this._min) + this._min);
}
}