We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d74577 commit a3dfd49Copy full SHA for a3dfd49
core/filter-downhill/app.js
@@ -22,7 +22,7 @@ const mapTwo = require('../../utils/map-two');
22
* @returns {number} result - sum of results
23
*/
24
const get = function(trackPoints, callback) {
25
- const downHillFilter = (pos1, pos2) => pos1.ele >= pos2.ele ? callback(pos1, pos2) : 0;
+ const downHillFilter = (pos1, pos2) => pos1.ele > pos2.ele ? callback(pos1, pos2) : 0;
26
const downhillItems = mapTwo(trackPoints, downHillFilter);
27
28
return downhillItems.reduce((prev, cur) => prev + cur);
0 commit comments