Skip to content

Commit

Permalink
Merge pull request #458 from ericblade/dev
Browse files Browse the repository at this point in the history
fix possible math error in describePatch
  • Loading branch information
ericblade authored Oct 10, 2022
2 parents 5ccee38 + 4dbd022 commit 95c523b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/locator/barcode_locator.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function describePatch(moments, patchPos, x, y) {
avg = 0;
// determine the similarity of the moments
for (k = 0; k < matchingMoments.length; k++) {
avg += matchingMoments[k].rad;
avg += matchingMoments[k]?.rad ?? 0;
}

// Only two of the moments are allowed not to fit into the equation
Expand Down

0 comments on commit 95c523b

Please sign in to comment.