diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/util.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/util.go b/src/util/util.go index 2d680b1a..931b14a8 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -19,6 +19,14 @@ func Max(first int, items ...int) int { return max } +// Max32 returns the smallest 32-bit integer +func Min32(first int32, second int32) int32 { + if first <= second { + return first + } + return second +} + // Max32 returns the largest 32-bit integer func Max32(first int32, second int32) int32 { if first > second { |