summaryrefslogtreecommitdiff
path: root/frontend/app/utils/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/utils/index.js')
-rw-r--r--frontend/app/utils/index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/frontend/app/utils/index.js b/frontend/app/utils/index.js
index 95660c5..fc12ee3 100644
--- a/frontend/app/utils/index.js
+++ b/frontend/app/utils/index.js
@@ -103,6 +103,8 @@ export const dist = (x1, y1, x2, y2) => Math.sqrt(Math.pow(x1 - x2, 2) + Math.po
export const mod = (n, m) => n - (m * Math.floor(n / m))
export const angle = (x1, y1, x2, y2) => Math.atan2(y2 - y1, x2 - x1)
+export const randint = n => Math.floor(Math.random() * n)
+
/* URLs */
export const sha256_tree = (sha256, branch_size=2, tree_depth=2) => {