Remove unused code

This commit is contained in:
Aya Morisawa 2018-12-27 20:10:29 +09:00
parent fed4b5e032
commit 59abef421b

View file

@ -1,11 +0,0 @@
/**
*
* @param samples
*/
export default function(samples) {
if (!samples.length) return 0;
const numbers = samples.slice(0).sort((a, b) => a - b);
const middle = Math.floor(numbers.length / 2);
const isEven = numbers.length % 2 === 0;
return isEven ? (numbers[middle] + numbers[middle - 1]) / 2 : numbers[middle];
}