diff options
author | pommicket <leonardomtenenbaum@gmail.com> | 2015-09-19 09:57:18 -0400 |
---|---|---|
committer | pommicket <leonardomtenenbaum@gmail.com> | 2015-09-19 09:57:18 -0400 |
commit | 50896f409ea74a20f732bc9b211a96ab969d6752 (patch) | |
tree | 38a5c7cc79722666f5d6c812d234df2ce3f66814 /AutoVideosLive.py | |
parent | 06d2a1f6d78361f9410e3c4326554b4568efe91b (diff) |
Fixed function length
Diffstat (limited to 'AutoVideosLive.py')
-rw-r--r-- | AutoVideosLive.py | 4 |
1 files changed, 2 insertions, 2 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: |