1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
This commit is contained in:
2022-03-27 10:20:59 +08:00
parent 4344259190
commit 7a17c79372

19
mathx/int.go Normal file
View File

@ -0,0 +1,19 @@
package mathx
// MaxInt returns the larger one of a and b.
func MaxInt(a, b int) int {
if a > b {
return a
}
return b
}
// MinInt returns the smaller one of a and b.
func MinInt(a, b int) int {
if a < b {
return a
}
return b
}