Skip to content

Commit

Permalink
hotfix: median in odd length datasets returned null
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas-virionis committed Dec 2, 2021
1 parent 96eebd5 commit ba74dee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class LinearModelOverTime {
dataset[dataset.length / 2]
]);
} else {
return Math.ceil(dataset[dataset.length / 2]);
return dataset[Math.ceil(dataset.length / 2)];
}
}

Expand Down

0 comments on commit ba74dee

Please sign in to comment.