Skip to content

Commit 15404e9

Browse files
Fix float issues
1 parent 0bd4742 commit 15404e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

yaramo/edge.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ def get_coordinates_on_edge_by_distance_from_start_node(
201201
x1, y1 = cur_geo_node.x, cur_geo_node.y
202202
x2, y2 = next_geo_node.x, next_geo_node.y
203203
factor = remaining_distance / distance_between_nodes
204-
x = x1 + (factor * (x2 - x1))
205-
y = y1 + (factor * (y2 - y1))
204+
x = float(x1) + (factor * float(x2 - x1))
205+
y = float(y1) + (factor * float(y2 - y1))
206206
return x, y
207207

208208
remaining_distance = remaining_distance - distance_between_nodes

0 commit comments

Comments
 (0)