add min and max for int

This commit is contained in:
Vladimir Markelov 2015-09-25 16:44:45 -07:00
parent a9f289b121
commit accb556055
1 changed files with 17 additions and 0 deletions

17
math_util.go Normal file
View File

@ -0,0 +1,17 @@
package clui
func MaxInt(a, b int) int {
if a > b {
return a
} else {
return b
}
}
func MinInt(a, b int) int {
if a < b {
return a
} else {
return b
}
}