Skip to content

Commit

Permalink
remove: docs & dist & fix decimalRand API
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleactii committed Mar 4, 2024
1 parent f2cc245 commit 60c0263
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
dist/
docs/
2 changes: 1 addition & 1 deletion src/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class UtilsSingleton {
*/
decimalRand(pNum1, pNum2, pPlaces = 1) {
const result = Number((Math.random() * (pNum1 - pNum2) + pNum2).toFixed(pPlaces));
return (result >= 1 ? Math.floor(result) : result);
return result;
}
/**
* Generates a random decimal number between two numbers with a specified number of decimal places.
Expand Down

0 comments on commit 60c0263

Please sign in to comment.