diff options
Diffstat (limited to 'src/util/util.go')
-rw-r--r-- | src/util/util.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/util/util.go b/src/util/util.go index a95340e7..113fee91 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -10,14 +10,11 @@ import ( ) // Max returns the largest integer -func Max(first int, items ...int) int { - max := first - for _, item := range items { - if item > max { - max = item - } +func Max(first int, second int) int { + if first >= second { + return first } - return max + return second } // Min returns the smallest integer |