Int is a function which returns the maximum of all the integers provided as arguments.
(values ...T)
| 4 | |
| 5 | // Int is a function which returns the maximum of all the integers provided as arguments. |
| 6 | func Int[T constraints.Integer](values ...T) T { |
| 7 | max := values[0] |
| 8 | for _, value := range values { |
| 9 | if value > max { |
| 10 | max = value |
| 11 | } |
| 12 | } |
| 13 | return max |
| 14 | } |
no outgoing calls