From 5ac113234dfa146f9067edf49d45e7f4e16a7c73 Mon Sep 17 00:00:00 2001 From: Michael Puehringer Date: Thu, 9 Nov 2023 10:46:29 +0100 Subject: [PATCH] Make getRandomInt public --- src/base/BaseUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/BaseUtils.ts b/src/base/BaseUtils.ts index 0d72508..0632b5c 100644 --- a/src/base/BaseUtils.ts +++ b/src/base/BaseUtils.ts @@ -116,7 +116,7 @@ export class BaseUtils { * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random * See: https://stackoverflow.com/a/1527820/2549748 */ - private static getRandomInt(min, max) { + public static getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min;