Skip to content

Commit

Permalink
FIX median calculating
Browse files Browse the repository at this point in the history
  • Loading branch information
littletof committed Jul 31, 2020
1 parent 24b691e commit ff94c98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function calculateExtraMetrics(result: BenchmarkResult) {
const middle = Math.floor(sorted.length / 2);
const median = sorted.length == 0
? 0
: (sorted.length % 2 == 0 ? sorted[middle]
: (sorted.length % 2 !== 0 ? sorted[middle]
: (sorted[middle - 1] + sorted[middle]) / 2);

return {
Expand Down

0 comments on commit ff94c98

Please sign in to comment.