diff --git a/add_curve_extra_objects/add_curve_torus_knots.py b/add_curve_extra_objects/add_curve_torus_knots.py
index 891754c5f5859cad1f2cb2f7fde039beae18b415..cc30d9b53e3ab91c2f9e689d268012247d3ab2a5 100644
--- a/add_curve_extra_objects/add_curve_torus_knots.py
+++ b/add_curve_extra_objects/add_curve_torus_knots.py
@@ -698,7 +698,7 @@ class torus_knot_plus(Operator, AddObjectHelper):
                 print("Approximate average TK length = %.2f" % avgTKLen)
 
             # x N factor = control points per unit length
-            self.torus_res = max(3, avgTKLen / links * 8)
+            self.torus_res = max(3, int(avgTKLen / links) * 8)
 
         # update align matrix
         self.align_matrix = align_matrix(self, context)