Skip to content

Commit

Permalink
Merge pull request #1 from r03ert0/main
Browse files Browse the repository at this point in the history
fix square root
  • Loading branch information
r03ert0 authored May 14, 2021
2 parents 52e19d6 + 491acba commit c2c76f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vis.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function buildSVG(
const euclidean = ({
source: { x: x1, y: y1 },
target: { x: x2, y: y2 },
}) => ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 1 / 2;
}) => ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5;

simulation = d3.forceSimulation(nodes)
.velocityDecay(0.1)
Expand Down

0 comments on commit c2c76f5

Please sign in to comment.