Change int to double for x,y

This commit is contained in:
DingZQ
2022-09-03 19:37:45 +08:00
parent c3b87db9ff
commit 910fecf24f

View File

@@ -94,7 +94,7 @@ async def fastapi_add_node(network: str, node: str):
return idx
@app.post("/addnodewithcoord/")
async def fastapi_add_node_with_coord(network: str, node: str, x: int, y: int):
async def fastapi_add_node_with_coord(network: str, node: str, x: float, y: float):
idx = add_node(network, node, JUNCTION)
print(idx)
count = get_count(network, NODE_COUNT)
@@ -129,7 +129,7 @@ async def fastapi_get_node_coord(network: str, node: str):
)
@app.post("/setnodecoord/")
async def fastapi_set_node_coord(network: str, node: str, x: int, y: int):
async def fastapi_set_node_coord(network: str, node: str, x: float, y: float):
set_node_coord(network, node, x, y)
return True