Skip to content

Commit 4047b3d

Browse files
committed
slight changes
1 parent 11f5f1a commit 4047b3d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Linear congruential generator.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ def randomInt(): # range [0 to 2^48]
1818
return seed
1919

2020
def randomFloat(): # range [0 to 1]
21-
randomfloat = (randomInt() / modulus)
22-
return(randomfloat)
21+
return(randomInt() / modulus)
2322

2423
def randomIntRange(min, max): # custom range
2524
return math.floor(randomFloatRange(min, max))
@@ -29,8 +28,8 @@ def randomFloatRange(min, max): # custom range
2928

3029
def randomBool(chance): #chance of getting true
3130
if(chance == 0):
32-
chance = 0.5;
33-
return randomFloat() < chance;
31+
chance = 0.5
32+
return randomFloat() < chance
3433

3534

3635
#execute functions

0 commit comments

Comments
 (0)