summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2015-04-16 12:56:01 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2015-04-16 12:56:01 +0900
commit48ab87294bb2df5ff32ff35a16231991a2e0887b (patch)
tree8475c9315835f34e0e368bbc4c41e3771b8c11b0 /src/util
parent3e1e75fe089e0bd86c30b83b3b03aaf580788e6c (diff)
Add --no-hscroll option to disable horizontal scroll
Close #193
Diffstat (limited to 'src/util')
-rw-r--r--src/util/util.go8
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 {