aboutsummaryrefslogtreecommitdiff
path: root/lib/rand.py
diff options
context:
space:
mode:
authorSkip Montanaro <[email protected]>2021-02-16 20:14:16 -0600
committerSkip Montanaro <[email protected]>2021-02-16 20:14:16 -0600
commitc2587c76f1b416cdbecb979e54941933246bf856 (patch)
treebb61ee9128075ce22af4eafa232f13c2e5a07896 /lib/rand.py
parentd90761a005b24018ae237bf551515772a1de656f (diff)
downloadpython-0.9.1-patched-QoL-c2587c76f1b416cdbecb979e54941933246bf856.tar.xz
python-0.9.1-patched-QoL-c2587c76f1b416cdbecb979e54941933246bf856.zip
starting over
Diffstat (limited to 'lib/rand.py')
-rw-r--r--lib/rand.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rand.py b/lib/rand.py
index 0ca1a53..0616483 100644
--- a/lib/rand.py
+++ b/lib/rand.py
@@ -3,10 +3,10 @@
import whrandom
def srand(seed):
- whrandom.seed(seed%256, seed/256%256, seed/65536%256)
+ whrandom.seed(seed%256, seed/256%256, seed/65536%256)
def rand():
- return int(whrandom.random() * 32768.0) % 32768
+ return int(whrandom.random() * 32768.0) % 32768
def choice(seq):
- return seq[rand() % len(seq)]
+ return seq[rand() % len(seq)]