diff --git a/uniro_backend/src/main/java/com/softeer5/uniro_backend/map/service/RouteCalculator.java b/uniro_backend/src/main/java/com/softeer5/uniro_backend/map/service/RouteCalculator.java index cb7877a4..f10571bb 100644 --- a/uniro_backend/src/main/java/com/softeer5/uniro_backend/map/service/RouteCalculator.java +++ b/uniro_backend/src/main/java/com/softeer5/uniro_backend/map/service/RouteCalculator.java @@ -281,7 +281,7 @@ private FastestRouteResultDTO generateResult(List shortestRoutes, Node st } currentNode = secondNode; - double heightDiff = firstNode.getHeight() - secondNode.getHeight(); + double heightDiff = secondNode.getHeight() - firstNode.getHeight(); if(heightDiff > 0){ heightIncreaseWeight += Math.min(LIMIT_RANGE ,Math.exp(heightDiff) - 1); }