summaryrefslogtreecommitdiff
path: root/src/utils/randInRange.js
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-05 17:33:25 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-05 17:33:25 -0600
commit69596ba244d6959dfe188ce958542c062b475f75 (patch)
tree91888868f7aa62a6c4c09d8047b49414259e8624 /src/utils/randInRange.js
parent545e129c7411714e7b40c742a23409629c9f767f (diff)
downloadbbiy-69596ba244d6959dfe188ce958542c062b475f75.tar.gz
bbiy-69596ba244d6959dfe188ce958542c062b475f75.zip
Checkpoint with particles
Diffstat (limited to 'src/utils/randInRange.js')
-rw-r--r--src/utils/randInRange.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/randInRange.js b/src/utils/randInRange.js
new file mode 100644
index 0000000..528221a
--- /dev/null
+++ b/src/utils/randInRange.js
@@ -0,0 +1,4 @@
+const randomInRange = (min, max) => {
+ // min <= random number <= max
+ return Math.floor(Math.random() * (max - min + 1)) + min;
+} \ No newline at end of file