diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-04-27 08:10:10 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-04-27 08:10:10 -0400 |
| commit | a222d88a13afc1b0f763f5d800fdda1426967bf4 (patch) | |
| tree | 8efca531a12c175ecb9fe9b3f1dbef952f7661ad /client/lib | |
| parent | 934d7dd83b34fd338b28d95da0397f4016516b82 (diff) | |
convert between notes and indices correctly
Diffstat (limited to 'client/lib')
| -rw-r--r-- | client/lib/util.js | 3 |
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 } |
