We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4047b3d commit 9e9b548Copy full SHA for 9e9b548
Linear congruential generator.py
@@ -18,18 +18,18 @@ def randomInt(): # range [0 to 2^48]
18
return seed
19
20
def randomFloat(): # range [0 to 1]
21
- return(randomInt() / modulus)
+ return (randomInt() / modulus)
22
23
def randomIntRange(min, max): # custom range
24
- return math.floor(randomFloatRange(min, max))
+ return (math.floor(randomFloatRange(min, max)))
25
26
def randomFloatRange(min, max): # custom range
27
return (min + randomFloat() * (max - min))
28
29
def randomBool(chance): #chance of getting true
30
if(chance == 0):
31
chance = 0.5
32
- return randomFloat() < chance
+ return (randomFloat() < chance)
33
34
35
#execute functions
0 commit comments