From 37084029072f4907cbdac828ff18d32d25dc2d68 Mon Sep 17 00:00:00 2001 From: Ze-Zheng Wu Date: Mon, 21 Mar 2022 19:03:40 +0800 Subject: [PATCH] typo: quadratic -> cubic --- src/components/Edges/BezierEdge.tsx | 2 +- src/components/Edges/SimpleBezierEdge.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Edges/BezierEdge.tsx b/src/components/Edges/BezierEdge.tsx index 9ac3f7f2..38f5508e 100644 --- a/src/components/Edges/BezierEdge.tsx +++ b/src/components/Edges/BezierEdge.tsx @@ -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; diff --git a/src/components/Edges/SimpleBezierEdge.tsx b/src/components/Edges/SimpleBezierEdge.tsx index cf931a34..adf92f34 100644 --- a/src/components/Edges/SimpleBezierEdge.tsx +++ b/src/components/Edges/SimpleBezierEdge.tsx @@ -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;