Finds the largest of a span of values
| 34 | |
| 35 | // Finds the largest of a span of values |
| 36 | double largest(std::span<const double> data) |
| 37 | { |
| 38 | double max {data[0]}; |
| 39 | for (auto value : data) |
| 40 | if (max < value) max = value; |
| 41 | return max; |
| 42 | } |
| 43 | |
| 44 | // Finds the largest of a vector of int values |
| 45 | int largest(std::span<const int> data) |