Skip to content

Commit

Permalink
Minor fix for mid index (#173)
Browse files Browse the repository at this point in the history
Co-authored-by: TANG ZHIXIONG <[email protected]>
  • Loading branch information
district10 and zhixiong-tang authored Jul 30, 2023
1 parent 604cf2a commit 32af632
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simplify.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

export default function simplify(coords, first, last, sqTolerance) {
let maxSqDist = sqTolerance;
const mid = (last - first) >> 1;
const mid = first + (last - first) >> 1;
let minPosToMid = last - first;
let index;

Expand Down

0 comments on commit 32af632

Please sign in to comment.