Skip to main content

max

Function max 

Source
pub fn max(data: &[f64]) -> Option<f64>
Expand description

Returns the maximum value in the slice.

§Returns

  • None if data is empty or contains NaN.

§Examples

use u_numflow::stats::max;
assert_eq!(max(&[3.0, 1.0, 4.0, 1.0, 5.0]), Some(5.0));