Merge branch 'master' into fix_long_getItems_request_URL
This commit is contained in:
@@ -2,6 +2,16 @@ function toLocaleStringSupportsOptions() {
|
||||
return !!(typeof Intl === 'object' && Intl && typeof Intl.NumberFormat === 'function');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random integer in a given range.
|
||||
* @param {number} min - Minimum of the range.
|
||||
* @param {number} max - Maximum of the range.
|
||||
* @returns {number} Randomly generated number.
|
||||
*/
|
||||
export function randomInt(min: number, max: number): number {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of a number formatted as a perentage.
|
||||
* @param {number} value The value as a number.
|
||||
|
||||
Reference in New Issue
Block a user