Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Nov 18, 2023
1 parent 3d1362a commit 321a2c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/math/bezier.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ function pointAtBezierWithLength(points, length, percent = 1, maxIteration = 20,
// Newton 法
let derivative1 = norm(at(approachT, points, 1)); // 1 阶导数
let derivative2 = norm(at(approachT, points, 2)); // 2 阶导数
let numerator = 2 * d * derivative1;
let denominator = 2 * d * derivative2 + derivative1 * derivative1;
let numerator = d * derivative1;
let denominator = d * derivative2 + derivative1 * derivative1;
approachT = approachT - numerator / denominator;
if(Math.abs(approachT - preApproachT) < eps) {
break;
Expand Down

0 comments on commit 321a2c5

Please sign in to comment.