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