Function std_dev::percentile::median

source ·
pub fn median<T: Ord + Clone>(values: &mut [T]) -> MeanValue<T>
Expand description

Convenience function for percentile with the 50% mark as the target and pivot_fn::rand (if the percentile-rand feature is enabled, else pivot_fn::middle).

See percentile_default_pivot_by for supplying a custom comparator function. This is critical for types which does not implement Ord (e.g. f64).