From 6dd5dcf9c875360e980993af53210e2e279d6529 Mon Sep 17 00:00:00 2001 From: sfc-gh-ext-simba-jy Date: Wed, 25 Oct 2023 08:26:46 -0700 Subject: [PATCH] refactored chooseRandom function --- lib/util.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/util.js b/lib/util.js index a59770271..01b6b62e3 100644 --- a/lib/util.js +++ b/lib/util.js @@ -448,10 +448,6 @@ function chooseRandom (firstNumber, secondNumber) { let bigNumber = Math.max(firstNumber, secondNumber); let smallNumber = Math.min(firstNumber, secondNumber); - if (bigNumber === smallNumber) { - return Math.random() * bigNumber; - } - return (Math.random() * (bigNumber - smallNumber)) + smallNumber; }