diff --git a/fov_estimator_node.py b/fov_estimator_node.py index 8bbd9b4..3fb7e81 100644 --- a/fov_estimator_node.py +++ b/fov_estimator_node.py @@ -305,6 +305,10 @@ class FOVEstimatorNode: (x1, y1), (x2, y2) = line1 (x3, y3), (x4, y4) = line2 + # Convert to float to avoid integer overflow + x1, y1, x2, y2 = float(x1), float(y1), float(x2), float(y2) + x3, y3, x4, y4 = float(x3), float(y3), float(x4), float(y4) + denom = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4) if abs(denom) < 1e-6: # Lines are parallel