Skip to content

Commit

Permalink
Fixes an issue in the double peak filter
Browse files Browse the repository at this point in the history
  • Loading branch information
rettier authored Aug 25, 2022
1 parent 05a20e2 commit 67c375a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Utilities = {
},

peakFilter(energies, sensitivity) {
energies = energies.sort().reverse();
energies = energies.sort((a, b) => (a - b)).reverse();
let peak = energies[0],
secondPeak = energies[1],
thirdPeak = energies[2],
Expand Down

0 comments on commit 67c375a

Please sign in to comment.