build: align URI to access JSON schemas
[e-mobility-charging-stations-simulator.git] / src / performance / PerformanceStatistics.ts
index b2333fded5f80ce1eba0c2638b08cb8ed8908ae2..a4dfd0b35c86ee26d178498f8a21814f3cee683e 100644 (file)
@@ -190,7 +190,7 @@ export class PerformanceStatistics {
     }
     const sortedDataSet = dataSet.slice().sort((a, b) => a - b);
     const middleIndex = Math.floor(sortedDataSet.length / 2);
-    if (sortedDataSet.length % 2) {
+    if (sortedDataSet.length % 2 === 0) {
       return sortedDataSet[middleIndex / 2];
     }
     return (sortedDataSet[middleIndex - 1] + sortedDataSet[middleIndex]) / 2;