Skip to content

Commit

Permalink
refactor: truncate the link angle value to one decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
hamed-musallam committed May 2, 2024
1 parent cdc0586 commit b842b9b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/component/2d/zones/ZonesAssignmentsLabels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function findBestLink(
const deltaLength = getDistance(a.x, a.y, b.x, b.y);

const distance = Math.min(aLength, bLength);
const angle = getAngleFromSides(deltaLength, aLength, bLength);
const angle = Number(getAngleFromSides(deltaLength, aLength, bLength).toFixed(1));

result.push({ distance, angle, targetPoint, sourcePoint });
}
Expand All @@ -85,7 +85,6 @@ function findBestLink(
return a.distance - b.distance;
}
});

return result[0];
}

Expand Down

0 comments on commit b842b9b

Please sign in to comment.