MCPcopy Create free account
hub / github.com/elftausend/graplot / max

Function max

src/eval.rs:3–12  ·  view source on GitHub ↗
(arr: &[f64])

Source from the content-addressed store, hash-verified

1use crate::{Matrix, FONT_SIZE};
2
3pub fn max(arr: &[f64]) -> f64 {
4 let mut max = arr[0].abs();
5 for value in arr {
6 let value = value.abs();
7 if value > max {
8 max = value;
9 }
10 }
11 max
12}
13
14pub fn min(arr: &[f64]) -> f64 {
15 let mut min = arr[0];

Callers 1

showMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected