summaryrefslogtreecommitdiff
path: root/math_funcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'math_funcs.py')
-rw-r--r--math_funcs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/math_funcs.py b/math_funcs.py
index ec7f7de..658797a 100644
--- a/math_funcs.py
+++ b/math_funcs.py
@@ -114,7 +114,7 @@ class best_chs_fits:
# for a given a set of points. The set of points is expected to be at
# each frame of the animation (start_frame indicates the start frame, integer)
# the function will return the above structure
-# it will be the generic cubic hermite spline form
+# it will be in the general cubic hermite spline form (t0 < tf)
def find_best_cubic_hermite_spline_fit(start_frame, values, angle_limit):
# check
@@ -157,10 +157,11 @@ def find_best_cubic_hermite_spline_fit(start_frame, values, angle_limit):
avg_value = 0
for i in range(len(values)):
if (abs(values[i]) < lowest_value):
- lowest_value = values[i]
+ lowest_value = abs(values[i])
if (abs(values[i]) > highest_value):
- highest_value = values[i]
+ highest_value = abs(values[i])
avg_value += abs(values[i])
+ print(highest_value)
scale_factor = (1 / highest_value) * (len(values) - start_frame)
avg_value /= len(values)