diff options
-rw-r--r-- | AutoVideosLive.py | 4 | ||||
-rw-r--r-- | AutoVideosLiveBlackWhite.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/AutoVideosLive.py b/AutoVideosLive.py index e617291..ea0f0a7 100644 --- a/AutoVideosLive.py +++ b/AutoVideosLive.py @@ -28,7 +28,7 @@ binary = ['*', '+', '-'] #Operations for 2 numbers numlist = ['x', 'y', 't', 'Constant'] -def randFunction(length, singleweight, numberweight): +def randFunction(functionLength, singleweight, numberweight): hasx = False hasy = False hast = False @@ -43,7 +43,7 @@ def randFunction(length, singleweight, numberweight): chanceend = 0 length = 1 #Number of operations done so far while True: - chanceend = (1.0 - (1.0 / length)) ** 12.0 + chanceend = (1.0 - (1.0 / length)) ** (float(functionLength)/7) if lasttype == 'n': number = random.random() if number < chanceend: diff --git a/AutoVideosLiveBlackWhite.py b/AutoVideosLiveBlackWhite.py index 33cf7db..1661ee1 100644 --- a/AutoVideosLiveBlackWhite.py +++ b/AutoVideosLiveBlackWhite.py @@ -43,7 +43,7 @@ def randFunction(length, singleweight, numberweight): chanceend = 0 length = 1 #Number of operations done so far while True: - chanceend = (1.0 - (1.0 / length)) ** 12.0 + chanceend = (1.0 - (1.0 / length)) ** (float(functionLength)/7) if lasttype == 'n': number = random.random() if number < chanceend: |