summaryrefslogtreecommitdiff
path: root/frontend/app/utils
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-09-13 12:15:42 +0200
committerJules Laplace <julescarbon@gmail.com>2021-09-13 12:15:42 +0200
commit0b882c65e8415901673e12c31aa900f42f007167 (patch)
tree395f536784ad202f93d774274a81da4903a65fba /frontend/app/utils
parent37cd7eeac7ee9cdeebfbf8729ac3e272ac65867e (diff)
add new subtitles
Diffstat (limited to 'frontend/app/utils')
-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) => {