Skip to content

Commit

Permalink
use float instead of decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
jeriox committed Feb 9, 2024
1 parent e7edf67 commit de5e560
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion yaramo/geo_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_distance_to_other_geo_point(self, geo_point_b: "Wgs84GeoPoint"):
return self.__haversine_distance(geo_point_b) / 1000

def __haversine_distance(self, geo_point_b: "GeoPoint"):
pi_over_180 = Decimal(math.pi / 180)
pi_over_180 = float(math.pi / 180)
return (
2
* 6371000
Expand Down
7 changes: 0 additions & 7 deletions yaramo/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,3 @@ def from_json(cls, json_str: str):
for signal in obj["signals"]:
topology.signals[signal["uuid"]].edge = topology.edges[signal["edge"]]
return topology


if __name__ == "__main__":
with open("../test.json", "r") as f:
json_str = f.read()
topology = Topology.from_json(json_str)
print(topology.to_json())

0 comments on commit de5e560

Please sign in to comment.