Skip to content

Commit

Permalink
typo: quadratic -> cubic
Browse files Browse the repository at this point in the history
  • Loading branch information
Sec-ant committed Mar 21, 2022
1 parent 6328b6f commit 3708402
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Edges/BezierEdge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function getBezierCenter({
y2: sourceY,
c: curvature,
});
// quadratic bezier t=0.5 mid point, not the actual mid point, but easy to calculate
// cubic bezier t=0.5 mid point, not the actual mid point, but easy to calculate
// https://stackoverflow.com/questions/67516101/how-to-find-distance-mid-point-of-bezier-curve
const centerX = sourceX * 0.125 + sourceControlX * 0.375 + targetControlX * 0.375 + targetX * 0.125;
const centerY = sourceY * 0.125 + sourceControlY * 0.375 + targetControlY * 0.375 + targetY * 0.125;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Edges/SimpleBezierEdge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function getSimpleBezierCenter({
x2: sourceX,
y2: sourceY,
});
// quadratic bezier t=0.5 mid point, not the actual mid point, but easy to calculate
// cubic bezier t=0.5 mid point, not the actual mid point, but easy to calculate
// https://stackoverflow.com/questions/67516101/how-to-find-distance-mid-point-of-bezier-curve
const centerX = sourceX * 0.125 + sourceControlX * 0.375 + targetControlX * 0.375 + targetX * 0.125;
const centerY = sourceY * 0.125 + sourceControlY * 0.375 + targetControlY * 0.375 + targetY * 0.125;
Expand Down

0 comments on commit 3708402

Please sign in to comment.