summaryrefslogtreecommitdiff
path: root/client/lib/util.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-04-27 08:10:10 -0400
committerJules Laplace <jules@okfoc.us>2017-04-27 08:10:10 -0400
commita222d88a13afc1b0f763f5d800fdda1426967bf4 (patch)
tree8efca531a12c175ecb9fe9b3f1dbef952f7661ad /client/lib/util.js
parent934d7dd83b34fd338b28d95da0397f4016516b82 (diff)
convert between notes and indices correctly
Diffstat (limited to 'client/lib/util.js')
-rw-r--r--client/lib/util.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/lib/util.js b/client/lib/util.js
index b2d95f5..7c3082d 100644
--- a/client/lib/util.js
+++ b/client/lib/util.js
@@ -1,3 +1,4 @@
function choice (a){ return a[ Math.floor(Math.random() * a.length) ] }
+function mod(n,m){ return n-(m * Math.floor(n/m)) }
-export { choice } \ No newline at end of file
+export { choice, mod }