extent

Function extent 

Source
pub fn extent<T: Ord>(data: &[T]) -> Option<(&T, &T)>
Expand description

Returns the minimum and maximum values in the slice.

Returns None if the slice is empty.

ยงExample

use d3rs::array::extent;

let data = vec![3, 1, 4, 1, 5, 9];
assert_eq!(extent(&data), Some((&1, &9)));