Skip to content

Commit

Permalink
Make getRandomInt public
Browse files Browse the repository at this point in the history
  • Loading branch information
puehringer committed Nov 9, 2023
1 parent d80024f commit 5ac1132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/base/BaseUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check warning on line 120 in src/base/BaseUtils.ts

View workflow job for this annotation

GitHub Actions / build / build-node

Assignment to function parameter 'min'
max = Math.floor(max);

Check warning on line 121 in src/base/BaseUtils.ts

View workflow job for this annotation

GitHub Actions / build / build-node

Assignment to function parameter 'max'
return Math.floor(Math.random() * (max - min + 1)) + min;
Expand Down

0 comments on commit 5ac1132

Please sign in to comment.