Commits

Jesse Rosenstock authored 6dd50bb6061
StatisticsMedian: Fix bug Previously, this could return the wrong result when there was an even number of elements. There were two `nth_element` calls. The second call could change elements in `[center2, end])`, which was where `center` pointed. Therefore, `*center` sometimes had the wrong value after the second `nth_element` call. Rewrite to use `max_element` instead of the second call to `nth_element`. This avoids modifying the vector.