Finds the median x value for an object with properties x and y (arrays of the same length)
x should be sorted in increasing order
Finds the median x value for an object with properties x and y (arrays of the same length)