2016-02-11 23:58:48 -08:00
|
|
|
package lib
|
|
|
|
|
2016-03-30 11:47:37 -07:00
|
|
|
func AbsInt(a int) int {
|
|
|
|
if a > 0 {
|
|
|
|
return a
|
|
|
|
}
|
|
|
|
return a * -1
|
|
|
|
}
|
|
|
|
|
2016-02-11 23:58:48 -08:00
|
|
|
func MaxInt(a, b int) int {
|
|
|
|
if a > b {
|
|
|
|
return a
|
|
|
|
}
|
|
|
|
return b
|
|
|
|
}
|
|
|
|
|
|
|
|
func MinInt(a, b int) int {
|
|
|
|
if a > b {
|
|
|
|
return b
|
|
|
|
}
|
|
|
|
return a
|
|
|
|
}
|